[R] unlock package environment ?
Ferdinand Alimadhi
falimadhi at iq.harvard.edu
Mon Dec 4 21:12:47 CET 2006
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
More information about the R-help
mailing list