[R] adding labels to x,y points
mark.baumeister7 at gmail.com
Wed Sep 21 01:43:24 CEST 2011
I am new to R.
I have a matrix that I have assigned to the object “colon”.
The dimenstions are 2000 62.
Each of the 62 columns (titled norm1, norm2, norm3, etc) has 2000
different numbers (‘continuous’ values) within it.
I have also assigned a name for each of the 2000 rows of the dataframe with
a prefix (i.e. g1 …. g2000) using the code (not sure if I did this right):
I have plotted the first 20 values from two of the columns(samples).
> plot(x,y,type='n',xlab='x norm1 sample',ylab='y norm2 sample',main='Norm1
> vs Norm2 - 20
Now I wish to assign labels to each point (above each point (i.e. pos=3) in
the plot with “g1 to g20 corresponding to each row but I am having trouble
with this step.
I have tried:
> text(x,y, label = row.names(colon[1:20]))
but nothing happens.
Thanks in advance
View this message in context: http://r.789695.n4.nabble.com/adding-labels-to-x-y-points-tp3828461p3828461.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help