[R] different plot symbols according to a factor

Frank Mattes rggefrm at ucl.ac.uk
Fri Jan 24 21:52:03 CET 2003


Dear R list subscriber,

I'm hoppiing my question didn't come up so far. I try to do somthing simple

  a<-c(1,4,5,2,7,34,56,78,76,54)
b=c(a<-c(1,4,5,2,7,34,56,78,76,54)
c<-c(0,0,0,0,0,1,1,1,1,1)

I would like to get a scatter diagram with different plot symbol for 0 and 
1 in c
I tried

plot(a,b, pch=c(1,2)[c])

which didn't work.

I appreciate if someone from the list could direct me in the right direction

Yours
Frank

Frank Mattes, MD
Department of Virology
Royal Free and University Medical School
London




More information about the R-help mailing list