Skip to content
Prev 275023 / 398506 Next

xyplot() or splom()?: two factors from same data frame

Hi Rich

Without  a dataset I am not sure what you need.

Further down the track you will need to plot what you finally need 
and this may help you decide what you need now

for finals try

library(lattice)
library(latticeExtra)

useOuterStrips(
xyplot(variable1 + variable2 ~ Date|Site, data = Data, groups = Groups, ...)
)

this will give you a matrix plot of the columns being the site and 
the rows being the variables.

but for now if you have a large screen you can do a splom by sites 
you may to subset sites.
use par.settings and levelplot settings to reduce the fontsizes etc 
so that you can get as much information

splom( ...|Site, data= Data,...)

if you want to have 2 plots eg  the x axis as time and another 
independent variable
you can plot them on the page together

eg

plot1 <- xyplot(....)
plot2 <- density.plot(...)

print(p1, position= c(0,0,1,0.5), more = T)
print(p1, position= c(0,0.5,1,1), more = F)

see ?print.trellis

As usual everything depends on the data

HTH

Duncan

Duncan Mackay
Department of Agronomy and Soil Science
University of New England
Armidale NSW 2351
Email Home: mackay at northnet.com.au
At 09:41 21/10/2011, you wrote: