[R] help

Kong, Chuang Fong c.kong at pmci.unimelb.edu.au
Thu Jun 22 03:47:23 CEST 2000


Dear All,
Further to answers to sorting, can someone tell me how can I sort a list
that contains duplicates (name) but keeping the duplicates together when
sorting the values. 
e.g., a data frame with name (in duplicates), Mvalues(may be different for
the duplicates)
name	M
1234	8
1234	8.3
4321	9
4321	8.1
If I sort by M, it will be 1234, 4321, 1234, 4321 but I want to keep the
duplicates together, so that it will give me 1234, 1234, 4321, 4321. I also
would like to set a cut-off, so that anything below a certain values will
not be sorted. Any help will be appreciated.
On another subject, I have downloaded and installed R1.1 for NT, it seems to
run fine but when I source codes that I have written for R1.0.1 for printing
labels to my data points, instead of printing name as label, it printed some
number that I have no idea what it represents, it is not the row number or
anything else. The code I used is 
plot(x,y, main="", xlab="x", ylab="y", type="n", ylim=c(-4,4), xlim=c(7,16))
points(x[d1], y[d1], pch=1,col=c(1:256))
points(x[d2], y[d2], pch=1,col=c(1:256))
up<-(abs(y)>=2)
if (sum(up)!=0) {
text(x[up],y[up], col="black",labels=name[up], cex=0.2, adj=1)}
What is wrong? it ran fine in R1.0.1 and it is working fine in R1.1.0 but
just not taking this text command right. Any suggestion will be appreciated.

Best regards,
Chuang Fong Kong, Ph D
Head, Microarrays
Peter MacCallum Cancer Institute - Research
St. Andrew's Place, East Melbourne
Victoria 3002, Australia
Tel: 61 3 9656-1796 or 1138
Fax: 61 3 9656-1411
e-mail: c.kong at pmci.unimelb.edu.au


-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://stat.ethz.ch/pipermail/r-help/attachments/20000622/ad012dbc/attachment.html


More information about the R-help mailing list