Re: [Rd] An update method for lists?

From: hadley wickham <h.wickham_at_gmail.com>
Date: Fri 15 Sep 2006 - 20:34:45 GMT

> 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



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sat Sep 16 06:37:24 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 15 Sep 2006 - 21:30:06 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.