x <- rnorm(100)
y <- rnorm(100)
z <- cut(rnorm(100),3)
# Scatterplot, mark using color with groups determined by Status
plot(x,y,col=markby(z))
# Scatterplot, mark using symbols with groups determined by Status
plot(x,y,pch=markby(z,use="symbols"))
# handing of missing values:
z[1:10] <- NA # set to missing
marks <- markby(z,na.action="omit")
sel <- !is.na(marks)
plot(x[sel],y[sel],col=marks[sel])
Run the code above in your browser using DataLab