« Interview with (presumed) Netflix prize-winner Bob Bell | Main | Call for speakers: DC Area UseR group »

August 11, 2009

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

How about:

library(lattice)
xyplot(year ~ peak | site, data=site.data)

To make one plot per file...

pdf(file="plot%01d.pdf", onefile=FALSE)
print(
xyplot(year ~ peak | site, data=site.data, layout=c(1, 1))
)
dev.off()

That's a very elegant solution for lattice plots -- thanks! Using plot%01d.pdf as the filename is especially clever (although you'd need plot%03d.pdf for 300 files.)

There's also another clever solution using plyr on the Learning R blog.

Couldn't resist adding the comment since conditioning is where lattice shines. The only problem is that it's won't work in parallel -- a feature that would be very nice for the lattice package!

The comments to this entry are closed.

Search Revolutions Blog




Got comments or suggestions for the blog editor?
Email David Smith.
Follow revodavid on Twitter Follow David on Twitter: @revodavid
Get this blog via email with Blogtrottr
‚Äč