Re: [Rd] relist, an inverse operator to unlist

From: Andrew Clausen <clausen_at_econ.upenn.edu>
Date: Sat, 19 May 2007 12:04:13 -0400

Hi all,

For reasons I can't explain, the code I posted worked in my session, but didn't work when I started a fresh one. standardGeneric() seems to get confused by defaults for missing arguments. It looks for a "missing" method with this code:

	relist <- function(flesh, skeleton=attr(flesh, "skeleton"))

{
standardGeneric("relist")
}

I uploaded yet another new version that adds a wrapper that seems to resolve standardGeneric()'s confusion like this:

	relist <- function(flesh, skeleton=attr(flesh, "skeleton"))

{
# need a wrapper, since standardGeneric gets confused by # default arguments. f <- function(flesh, skeleton) standardGeneric("relist") f(flesh, skeleton) }

Cheers,
Andrew



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Sat 19 May 2007 - 16:06:16 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 22 May 2007 - 03:33:18 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.