[Rd] Bug in 'setRefClass()' regarding how args in '...' are passed to 'setClass()'?

From: Janko Thyson <janko.thyson.rstuff_at_googlemail.com>
Date: Wed, 24 Aug 2011 11:35:24 +0200


Dear list,

in ?setRefClass it says that '...' can be used to supply other arguments that are passed to 'setClass()'.

Yet, I think that's not true for argument 'prototype', but maybe I overlooked something:

setClass("Plugin")
setClass(Class="PluginDefault", contains="Plugin",

     representation=representation(.PRIMARY="function"),
     prototype=prototype(.PRIMARY=function(src) src)

)

PluginDefault <- function() new("PluginDefault") PluginDefault()
PluginDefault()$.PRIMARY # Desired prototype content

#+++++ START A NEW R SESSION BEFORE CONTINUING

setRefClass("Plugin")
setRefClass(Class="PluginDefault", contains="Plugin", 
fields=list(.PRIMARY="function"),
     prototype=prototype(.PRIMARY=function(src) src)

)

PluginDefault <- function() new("PluginDefault") PluginDefault()
PluginDefault()$.PRIMARY # No prototype content

Regards,
Janko



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed 24 Aug 2011 - 09:46:54 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 Thu 25 Aug 2011 - 15:40:26 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