Hello,
Somewhere in my S3 package "foo" I want to create, on the fly, a new S4
class which extends another S4 class "bar".
setClass("fooS4bar", representation("bar", bar.data = "data.frame"),
where = parent.env(environment()))
where "where" is the environment of my "foo" package.
But I get:
Error in assign(classMetaName(Class), def, where) :
cannot add bindings to a locked environment
Is there any way to unlock the package environment, add a binding and
lock it back? How the environment of my own package got locked on the
first place?
Thanks for your help,
Ferdinand
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.