[ESS] Developing R packages under ESS

Ross Boylan Ro@@@Boy|@n @end|ng |rom uc@|@edu
Thu Mar 8 19:51:11 CET 2018


On Thu, Mar 08, 2018 at 04:22:04PM +0100, Vitalie Spinu wrote:
> 
> 
> >> On Wed, Mar 07 2018 18:29, Ross Boylan wrote:
> 
> > The file I opened initially, the one that sources all the others, is above the
> > package directory.  It sources files under the package directory.  When I
> > modified one of them I used C-c C-t C-s to disable the namespace before I did
> > C-c C-l.  This was on the theory that the source() commands earlier stuck
> > everything in the global namespace.
> 
> This sounds too complicated.

I was only doing it because of namespace locked errors, which now seem
to be gone.  I was trying to do everything in the global namespace.

> You don't need to source anything or use C-c C-t
> C-s as all ess eval commmands are executed automatically in the package
> directory. Even if the package is installed from CRAN you shouldn't see
> "namespaced locked" error. Just start R inside package directory and start
> eval-ing stuff as you normally do.

Do you mean that R must be launched from inside the package directory?
Or at least have the current working directory inside the package?  I
haven't been doing that.  ESS has seemed aware when a particular file
was in a package regardless of where R is running (I was using C-c C-t
C-s to put things in the global namespace; using the package namespace
was automatic).

> 
> As to the devtools integration, it's a breeze - C-c C-w i or C-c C-w l are
> pretty fast, surely not slow enough to interfere with the workflow.
> 
I haven't been using devtools, partly (as I recall) because they force
certain other tool choices.  But I might have another look.

Ross




More information about the ESS-help mailing list