Deepayan,

 It is empty.
> subset(dat11, Pri_No %in% c(1,2))
 [1] tally        scape        numid        bbContag     bbED
 [6] bbENN_MN     bbLPI        bbLSI        bbPAFRAC     bbPD
[11] bbPROX_MN    pfor         year         extent       bi_ca
[16] r            ex_bin       PriNo        pri1234      pri_ex
[21] sc_ex        Sc_ex_pri    sc_recov     recov_bica   sc_reco_bica
[26] sc_ec_p1234  Pri_No       id_no        RecovUnit    Max.est
[31] X1960        X1970        X1980        X1990        X1995
[36] X2000        X2005        X1           X2           X3
[41] X4           X5           X6           X7           slope
[46] std.slope    CI.SLOPe     X.CI.SLOPE
<0 rows> (or 0-length row.names)

Somehow my Pri_No got reclassified to TRUE and FALSE. I did it over and it
works.  Sorry about the waste of time. But it helped me out.

Thanks,
Michael Just


On Wed, Oct 8, 2008 at 7:37 PM, Deepayan Sarkar
<deepayan.sarkar@gmail.com>wrote:

> On Wed, Oct 8, 2008 at 1:56 PM, Michael Just <mgjust@gmail.com> 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
>

	[[alternative HTML version deleted]]

