On Wed, Oct 8, 2008 at 1:56 PM, Michael Just <[EMAIL PROTECTED]> wrote: > Hello, this code below was from a helpful R-help user. > > dat <- read.csv("Resid_fix2.csv", sep="," , header=T) > dat11 <- dat[1:413,] > # convert ambiguous columns to factors: > dat11$Pri_No <- factor(dat11$Pri_No) > dat11$RecovUnit <- factor(dat11$RecovUnit) > # plot: > require(lattice) > bwplot(bbED~ Pri_No | RecovUnit, data=dat11, as.table=TRUE, layout=c(4,1)) > > This works, but I am trying to do this: >> bwplot(bbED~ Pri_No | RecovUnit, data=dat11, subset = (Pri_No %in% > c(1,2)), as.table=TRUE, layout=c(2,1)) > Error in limits.and.aspect(prepanel.default.bwplot, prepanel = prepanel, : > need at least one panel > > How can I choose only two groups from 'Pri_No'?
It's hard to say without a reproducible example. Your error message suggests that your subsetting operation results in an empty dataset. What do you get with subset(dat11, Pri_No %in% c(1,2)) ? -Deepayan ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.