[R] lattice help

Sundar Dorai-Raj sundard at pdf.com
Mon Apr 22 17:38:07 CEST 2002


I'm new to lattice and can't figure out what the problem is with the
following example:

#########################
> library(lattice)
Loading required package: grid 

Attaching package `lattice':


	The following object(s) are masked _by_ .GlobalEnv :

	 xyplot 


	The following object(s) are masked from package:base :

	 levels 

> test.data <- data.frame(x=rnorm(100),
+                         y=rnorm(100),
+                         group=gl(5,20))
> xyplot(y~x|group,data=test.data,
+        panel=function(x,y,subscripts,df) {
+          text(x,y,labels=as.character(df[subscripts,"group"]))
+          abline(lm(y~x))
+        },df=test.data)
Error in unique(by) : Argument "by" is missing, with no default
> 
#########################

I get the same error when I try the examples from the `xyplot' help
page:

#########################
> data(quakes)
> xyplot(long ~ lat , data = quakes)
Error in unique(by) : Argument "by" is missing, with no default
>
#########################

What am I missing?


> version
         _              
platform i386-pc-mingw32
arch     x86            
os       Win32          
system   x86, Win32     
status                  
major    1              
minor    4.0            
year     2001           
month    12             
day      19             
language R              

Thanks,

Sundar

-- 

Sundar Dorai-Raj, Ph.D.
Statistical Methods Engineer
PDF Solutions, Inc.
(972) 889-3085 x216
(214) 392-7619 cell
sundard at pdf.com
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list