Re: [Rd] Class generator functions for reference classes

From: Hadley Wickham <h.wickham_at_gmail.com>
Date: Tue, 30 Oct 2012 17:25:55 -0500

> As of rev. 61035 in r-devel, setRefClass() now returns a generator function,
> as setClass() has done since 2.15.0.
>
> The convenient style is now:
> mEdit <- setRefClass("mEdit",......)
> xx <- mEdit(data = xMat)
>
> instead of
> xx <- mEdit$new(data = xMat)
>
> The returned object still has fields and methods accessible as before.

Similarly, would it be possible for setGeneric and setMethod to return the equivalent generic and method objects?

Hadley

-- 
RStudio / Rice University
http://had.co.nz/

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Tue 30 Oct 2012 - 22:31:39 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

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 Wed 31 Oct 2012 - 12:40:49 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.

list of date sections of archive