Try factor(vec2) in your bwplot() call. -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Ernesto Jardim Sent: Friday, July 09, 2004 9:41 AM To: Mailing List R Subject: [R] Problem with bwplot Hi, I'm ploting some box-and-whisker plots with bwplot but I'm not getting any box-and-whiskers ... just dots. I'm using lattice 0.9-16 with R 1.9.1. Try library(lattice) rnorm(60)->vec1 rep(1:3,20)->vec2 rep(LETTERS[1:2],30)->vec3 bwplot(vec1~vec2|vec3) Thanks EJ ______________________________________________ R-help at stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Hi, I'm ploting some box-and-whisker plots with bwplot but I'm not getting any box-and-whiskers ... just dots. I'm using lattice 0.9-16 with R 1.9.1. Try library(lattice) rnorm(60)->vec1 rep(1:3,20)->vec2 rep(LETTERS[1:2],30)->vec3 bwplot(vec1~vec2|vec3) Thanks EJ
Yes, It works. Thanks EJ PS: It's inconsistent with boxplot, which works without making vec2 a factor. On Fri, 2004-07-09 at 17:36, Austin, Matt wrote:> Try factor(vec2) in your bwplot() call. > > -----Original Message----- > From: r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Ernesto Jardim > Sent: Friday, July 09, 2004 9:41 AM > To: Mailing List R > Subject: [R] Problem with bwplot > > > Hi, > > I'm ploting some box-and-whisker plots with bwplot but I'm not getting > any box-and-whiskers ... just dots. > > I'm using lattice 0.9-16 with R 1.9.1. > > Try > > library(lattice) > rnorm(60)->vec1 > rep(1:3,20)->vec2 > rep(LETTERS[1:2],30)->vec3 > bwplot(vec1~vec2|vec3) > > Thanks > > EJ > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html
> From: Ernesto Jardim > > Yes, > > It works. > > Thanks > > EJ > > PS: It's inconsistent with boxplot, which works without making vec2 a > factor.I think the problem is in the flexibility of bwplot. If `horizontal' is not set explicitly, it tries to guess by testing whether `y' or `x' is factor. It probably should throw either an error or at least a warning if not one and only one of them is factor. Andy> On Fri, 2004-07-09 at 17:36, Austin, Matt wrote: > > Try factor(vec2) in your bwplot() call. > > > > From: r-help-bounces at stat.math.ethz.ch > > [mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Ernesto Jardim > > > > Hi, > > > > I'm ploting some box-and-whisker plots with bwplot but I'm > not getting > > any box-and-whiskers ... just dots. > > > > I'm using lattice 0.9-16 with R 1.9.1. > > > > Try > > > > library(lattice) > > rnorm(60)->vec1 > > rep(1:3,20)->vec2 > > rep(LETTERS[1:2],30)->vec3 > > bwplot(vec1~vec2|vec3) > > > > Thanks > > > > EJ