If I have a dataset grouped into 3 classes, how can I construct a
stripchart where the markers are different for each class, e.g. a cross
for 1, square for 2 and circle for 3. In the example below I try to
define the marker type by the class but this only changes all the
markers from the default squares into circles. I am assuming I need to
set pch as an argument in par but am unsure how to proceed.
data <- rnorm(9)
class <- c(1,1,1,2,2,2,3,3,3)
x <- data.frame(data,class)
stripchart(x[,1], pch=x[,2])
Thanks,
Sam.
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.