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