[R] symbol ok colors?
John Fox
jfox at mcmaster.ca
Tue Jan 28 18:17:02 CET 2003
Dear Luis,
At 04:23 PM 1/28/2003 +0000, Luis Silva wrote:
>Thanks to all! as.character solved my problem. And if I wanted
>different colors instead?
The argument col is also vectorized, so something like plot( ....,
col=class) will work if class consists of small intergers. Alternatively,
use class to index a vector of colors, as in col=c("red", "green",
"blue")[class].
John
-----------------------------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario, Canada L8S 4M4
email: jfox at mcmaster.ca
phone: 905-525-9140x23604
web: www.socsci.mcmaster.ca/jfox
-----------------------------------------------------
More information about the R-help
mailing list