[R] Color barplots with a conditional?

Allie818
Wed, 14 Sep 2011 20:14:20 -0000

I've made a barplot that has several bars. I'd like the bars to be
colored
according to the type of category they are in. Is there a way to put a
conditional into the color parameter in barplot?
i.e. if data$category[i] == 1, color the bar red

Do I need to generate the coloring sequence before the plot code first?

Thanks!!


--
View this message in context:
http://r.789695.n4.nabble.com/Color-barplots-with-a-conditional-tp3813990p3813990.html
Sent from the R help mailing list archive at Nabble.com.