[ESS] cannot add bindings to a locked environment

Boylan, Ross Ro@@@Boy|@n @end|ng |rom uc@|@edu
Mon Jul 25 19:22:36 CEST 2016


I'm not sure what you mean by "eval from out of  package file", which sounds like one of the things I already tried.  But I tried this alternate sequence, which perhaps is what you were thinking of:
> library(LazarSim)
 Loading required package: Matrix
 > # C-c C-l here 
 [1] "test"
 [1] "shortName"
 [1] "shortName"
 [1] "test"
 Sourced file /home/ross/Lazar/Test.R  # outside of the package hierarchy
 > sb <- StandBonf(alpha=0.1)
 > class(sb)
 [1] "StandBonf"
 attr(,"package")
 [1] ".GlobalEnv"
!> shortName(sb)
 [1] "StandBonf"

So everything's OK when I do it that way.
Ross

P.S. Sorry to all about the top posting; my mail client doesn't give me much choice.
________________________________________
From: Vitalie Spinu [spinuvit using gmail.com]
Sent: Monday, July 25, 2016 2:17 AM
To: Boylan, Ross
Cc: ess-help using r-project.org
Subject: Re: [ESS] cannot add bindings to a locked environment

.....

> Third try: copy the file with the test code to a directory that is not part of
> the package.  Finally I'm able to read the file in without loading the
> package, and everything works

Ok. But if you do load your package and then eval from out of package file. Do
you see the problem? If that's the case then it's not ESS specific.


  Vitalie




More information about the ESS-help mailing list