R Quickie: Custom Panel Functions and Default Arguments

April 16, 2012
By

(This article was first published on dylan's blog, and kindly contributed to R-bloggers)

Sometimes the basic functionality in lattice graphics isn't enough. Custom "panel functions" are one approach to fully customizing the lattice graphics system. Two examples are given below illustrating how to define an (inline) custom panel function for adding a regression line to an entire data set in the presence of grouping variable. The "..." keyword instructs our custom panel function to accept all arguments typically passed to a panel function, and can be re-used in clever ways within our panel function.

read more

To leave a comment for the author, please follow the link and comment on his blog: dylan's blog.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.