[R] coplot with boxplot panel function

Chuck Cleland ccleland at optonline.net
Tue Feb 18 15:01:02 CET 2003


   I am attempting to construct a conditioning plot with a pair 
of boxplots within each panel.  The resulting plot has panels 
misplaced.  One misplaced panel is on top of the subcomponent 
describing ranges of the conditioning variable.  This is what I did:

X <- cut(rnorm(200), 2)
Y <- runif(200)
Z <- rnorm(200)
given.Z <- co.intervals(Z, number = 4, overlap = .25)

coplot(Y ~ X | Z, given.v = given.Z,
panel = function(x, y, ...){boxplot(y ~ x)})

   Any suggestions as to why this does not work and what the 
correct specification is would be greatly appreciated.

thanks,

Chuck Cleland

WinXP Pro

 > version
          _
platform i386-pc-mingw32
arch     i386
os       mingw32
system   i386, mingw32
status
major    1
minor    6.2
year     2003
month    01
day      10
language R




More information about the R-help mailing list