[R] xyplot with 2 y-axes

Nathan Weisz Nathan.Weisz at uni-konstanz.de
Mon Aug 8 15:45:06 CEST 2005


Dear R-helpers,

I'm trying to get xyplot to plot 2 y-axes. I looked at the examples  
and googled around. This is how far I got so far.

test<-data.frame(a=rnorm(100),b=rnorm(100)*10,ind=rep(1:10,10),con=rep 
(1:10,rep(10,10)))
xyplot(a+b~con|ind,data=test,allow.multiple=T)

This however puts a+b on one axis. I'd need e.g. a as left and b as  
right axis.

Best wishes,
Nathan
------------------------------
$platform
[1] "powerpc-apple-darwin7.9.0"
$arch
[1] "powerpc"
$os
[1] "darwin7.9.0"
$system
[1] "powerpc, darwin7.9.0"
$status
[1] ""
$major
[1] "2"
$minor
[1] "1.1"
$year
[1] "2005"
$month
[1] "06"
$day
[1] "20"
$language
[1] "R"




More information about the R-help mailing list