Re: [R] Using "|"

From: Sundar Dorai-Raj <sundar.dorai-raj_at_pdf.com>
Date: Wed 04 May 2005 - 01:57:24 EST

Jim Milks wrote on 5/3/2005 8:34 AM:
> Dear all,
>
> I have a rodent dataset that I am reanalyzing. The set consists of
> several variables (#Microtus captured, Grass stems/m^2, etc), among
> which is a Grid factor variable c(North,South). I have evidence that
> there are significant differences in vegetation and rodent populations
> between the two locations (from chi-square tests) and would like to run
> separate analyses along North/South lines on the rest of my data. For
> example, I type:
>
> > plot(Microtus.T~Grass | Grid)
>
> However, I get the following:
>
> Error in plot.window(xlim, ylim, log, asp, ...) :
> need finite xlim values
> In addition: Warning messages:
> 1: "|" not meaningful for factors in: Ops.factor(Grass, Grid)
> 2: no finite arguments to min; returning Inf
> 3: no finite arguments to max; returning -Inf
>
> Other than adding xlim arguments, what else can I do, especially in
> light of warning message 1?
>
> Thank you in advance.
>
> Sincerely,
> Jim Milks

Are you confusing "plot.formula" with "lattice:xyplot"? Your example should work if you use:

library(lattice)
xyplot(Microtus.T ~ Grass | Grid)

HTH, --sundar



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed May 04 02:39:05 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:32 EST