[Rd] An update method for lists?

hadley wickham h.wickham at gmail.com
Fri Sep 15 22:34:45 CEST 2006


> If a list is used to store "defaults" and you want a safe way to
> change only a few of the values...
> I presume you use this for manipulating the settings of lattice
> parts ?

I use something similar in ggplot (except not recursive):

defaults <- function(x, y)  {
	c(x, y[setdiff(names(y), names(x))])
}

Hadley




More information about the R-devel mailing list