[ESS] Problem with ESS / R / tracebug under OS X

Vitalie Spinu spinuvit at gmail.com
Thu Jun 27 18:21:38 CEST 2013


`install` in devtools keeps the source. load_all forget it. I sent a
pull request to Hadley to correct this. Feel free to use my branch till
it is merged: https://github.com/hadley/devtools/pull/319

Would it make sense to hook load_all on a key in dev-map? 

Say, C-c C-t l will search for the R package root from the current
file. Then ask the user for the directory, then issue load_all?

Unfortunately install, nor load_all play well with S4. I always have to
restart my R to reload the package. 

    Vitalie

 >> Rainer M Krug <Rainer at krugs.de>
 >> on Thu, 27 Jun 2013 12:07:43 +0200 wrote:

 > Vitalie Spinu <spinuvit at gmail.com> writes:
 >> Hi Rainer, 

 > Hi Vitalie,

 > sorry for not coming back to you earlier.

 >> 
 >> It is an R issue. It depends on how you source or evaluate the code in
 >> the first place, and ESS cannot do much if R doesn't report error
 >> references. 

 > Makes sense. So here we go:

 >> 
 >> You should give more details of what you mean by "I run code in a
 >> package". R shows <text>#N if the code was evaluated with
 >> eval(parse(text=...)) and may be on some other occasions.

 > I have written a small test package and put it on dropbox 

 > https://www.dropbox.com/s/qnoo78h9phpapjo/testTraceback_0.0-1.tar.gz

 > If you install the package, load it and call the function testprg, I get
 > the following:

 > ,----
 > | > install.packages("packages/testTraceback_0.0-1.tar.gz", repos=NULL, type="source")
 > | Installing package into '/Users/rainerkrug/Documents/Projects/AlienManagementDrakensberg/sim/library'
 > | (as 'lib' is unspecified)
 > | * installing *source* package 'testTraceback' ...
 > | ** R
 > | ** preparing package for lazy loading
 > | ** help
 > | No man pages found in package  'testTraceback' 
 > | *** installing help indices
 > | ** building package indices
 > | ** testing if installed package can be loaded
 > | * DONE (testTraceback)
 > | > library(testTraceback)
 > | > testprog(3)
 > | Error in testprog(3) : object 'hallo' not found
 > | >
 > `----

 > No traceback is available - ess debug minor mode is enabled

 > When I use the devtools package and load_all() to load the directory, I
 > get the following:

 > ,----
 > | > Library("devtools")
 > | > load_all("packages/testTraceback/")
 > | Loading testTraceback
 > | > testprog(2)
 > | Error in testprog(2) (from <text>#3) : object 'hallo' not found
 > | >
 > `----

 > and no further information.

 > When I source the file, I get the full traceback:

 > ,----
 > | > source("packages/testTraceback/R/testprog.R")
 > | > testprog(3)
 > | Error in testprog(3) (from testprog.R#3) : object 'hallo' not found
 > | >  
 > `----

 > I am using the official installation of R (3.0.1) for Mac, GNU emacs and
 > ESS from git (ess-version : 13.05-1 [<unknown>]).

 > Any suggestions on why the information is not comming through when using
 > load_all()? It was working under Linux, and I did not change my emacs.el
 > file.

 > Thanks,

 > Rainer

 >> 
 >> Vitalie
 >> 
 >> >> Rainer M Krug <Rainer at krugs.de>
 >> >> on Wed, 26 Jun 2013 09:59:54 +0200 wrote:
 >> 
 >> > Hi
 >> > I migrated from Linux to Mac OS X and I am experiencing the following
 >> > problem in ESS / R with tracebug:
 >> 
 >> > When I run code (in a package) and an error occurs, the location is not
 >> > shown correctly, but only <text> instead:
 >> 
 >> > ,----
 >> > | sh: line 1: 62906 Trace/BPT trap: 5 'r.param.scale'
 >> > | --interface-description >
 >> > | /var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T//RtmpsB4JC1/filef5007f3e9ee7'
 >> > | 2>
 >> > | /var/folders/50/wcr5bjwn75q595n6x82gxj280000gn/T//RtmpsB4JC1/filef50047393ea0'
 >> > | Error in if (file.exists(file) == FALSE) if (!missing(asText) && asText ==  : 
 >> > |   argument is of length zero
 >> > | Error in parseGRASS(cmd, legacyExec = legacyExec) (from <text>#150) : 
 >> > |   r.param.scale not parsed
 >> > `----
 >> 
 >> > I tried it with starting emacs with -q and only loading ess 5.14, but
 >> > still the same as using the one from git.
 >> 
 >> > Any suggestions?
 >> 
 >> > Thanks,
 >> 
 >> > Rainer
 >> 
 >> ______________________________________________
 >> ESS-help at r-project.org mailing list
 >> https://stat.ethz.ch/mailman/listinfo/ess-help>



More information about the ESS-help mailing list