Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

remove the outliers in bwplot

Tags:

r

lattice

I'm creating a bwplot{lattice} and I would like it not to display the outliers. Here is example code:

m <- mtcars

m$gear <- factor(m$gear)
m$vs <- factor(m$vs)
m$am <- factor(m$am)

bwplot(drat ~ gear | am + vs,
   data = m)
like image 733
Tania Avatar asked Aug 16 '13 14:08

Tania


1 Answers

Just set do.out=FALSE, like this:

bwplot(drat ~ gear | am + vs, data = m, do.out = FALSE)

Pro tip: as is often the case with lattice plotting functions, that argument is documented in ?panel.bwplot (the function to which bwplot() passes it on) rather than in the already-way-too-long-to-be-readable ?bwplot.

like image 88
Josh O'Brien Avatar answered Sep 25 '22 04:09

Josh O'Brien