Christopher W. Ryan wrote:
suppose I have some logical vector
x <- as.logical(c(0,0,0,1,0,0,1,1,0))
x
How would I make the words TRUE appear on the screen in a different
color from the words FALSE?
tfsample<-as.logical(sample(c(0:1),10,TRUE))
plot(1:10,type="n")
text(1:10,1:10,tfsample,col=ifelse(tfsample,"red","blue"))
Jim
______________________________________________
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.