Amanda Young wrote:
Hi,
I am a complete R rookie so this question is probably really simple
but I haven't found an answer on the web that I can understand.
My data frame has 3 columns, A, B and C. A and B have numbers (about
8000 rows), C is a factor which is either true or false. So I can
JIV == Jorge Ivan Velez [EMAIL PROTECTED]
on Fri, 12 Sep 2008 18:39:04 -0400 writes:
JIV Dear Amanda,
JIV Try this:
JIV # Data set
JIV set.seed(123)
JIV DF=data.frame(A=rnorm(10),B=rpois(10,10),C=sample(1:3,10,replace=T))
JIV attach(DF)
JIV # Plot
JIV
Hi,
I am a complete R rookie so this question is probably really simple
but I haven't found an answer on the web that I can understand.
My data frame has 3 columns, A, B and C. A and B have numbers (about
8000 rows), C is a factor which is either true or false. So I can
plot A vs B with
See argument 'col' to plot()/points(). Setup a 'col' vector of length
equal to the number of data points and have the 'C' variable specify
the colors of the individual elements. Then call plot()/points() with
argument 'col'.
My $.02
/HB
On Fri, Sep 12, 2008 at 3:29 PM, Amanda Young [EMAIL
Dear Amanda,
Try this:
# Data set
set.seed(123)
DF=data.frame(A=rnorm(10),B=rpois(10,10),C=sample(1:3,10,replace=T))
attach(DF)
# Plot
plot(A,B,pch=16,col=C)
legend('topleft',paste('Group',1:3,sep= ),col=1:3,pch=16)
HTH,
Jorge
On Fri, Sep 12, 2008 at 6:29 PM, Amanda Young [EMAIL PROTECTED]
On Fri, Sep 12, 2008 at 5:29 PM, Amanda Young [EMAIL PROTECTED] wrote:
Hi,
I am a complete R rookie so this question is probably really simple
but I haven't found an answer on the web that I can understand.
My data frame has 3 columns, A, B and C. A and B have numbers (about
8000 rows), C is
6 matches
Mail list logo