[R] two colors and putting lines on bar plots

2009-02-25 Thread John Malone
Hi all, I want to represent two categories with one color and have other categories a different color on a bar plot. I can do this using for one category/number using the ifelse call in col but how to extend to two categories/numbers? barplot(dataframe$vector_o_numbers, col=ifelse(dataframe$vect

[R] implementing Grubbs outlier test on a large dataframe

2009-02-14 Thread John Malone
Hi! I'm trying to implement an outlier test once/row in a large dataframe. Ideally, I'd do this then add the Pvalue results and the number flagged as an outlier as two new separate columns to the dataframe. Grubbs outlier test requires a vector and I'm confused how to make each row of my datafram