markleeds at verizon.net
2008-Aug-18 00:15 UTC
[R] trying to mimic page 70 of Software for Data Analysis
I was trying to do what is on page 70 of John Chambers' new book namely using trace to invoke the browser by doing trace(zapsmall, edit = TRUE) but , typing above at an R prompt, I get trace(zapsmall, edit=TRUE) sh: EMACS: command not found Error in edit(name, file, title, editor) : problem with running editor EMACS I looked in the archives but maybe it's a problem with the keywords I was using. If anyone could tell me what I need to do, it would be great. I'm thinking that I need to put something in my .Rprofile but I'm not sure what. Thanks. Oh, I use linux and my sessionInfo is below and I am using GNU Emacs 22.1.1. I usually use ESS and EMACS together but for this I figured it would be simpler to start from the R-prompt so that I was aligned with John's book as much as possible. #=========================================================================== sessionInfo() R version 2.7.0 (2008-04-22) i686-redhat-linux-gnu locale: LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C attached base packages: [1] datasets utils stats graphics grDevices methods base other attached packages: [1] gsubfn_0.3-3 proto_0.3-8 latticeExtra_0.4-1 RColorBrewer_1.0-2 lattice_0.17-7 faraway_1.0.3 nnet_7.2-42 car_1.2-8 reshape_0.8.0 [10] zoo_1.5-3 chron_2.3-22 MASS_7.2-42 loaded via a namespace (and not attached): [1] grid_2.7.0
Marc Schwartz
2008-Aug-18 01:50 UTC
[R] trying to mimic page 70 of Software for Data Analysis
on 08/17/2008 07:15 PM markleeds at verizon.net wrote:> I was trying to do what is on page 70 of John Chambers' new book namely > using trace to invoke the browser by doing > > trace(zapsmall, edit = TRUE) > > but , typing above at an R prompt, I get > > trace(zapsmall, edit=TRUE) > sh: EMACS: command not found > Error in edit(name, file, title, editor) : > problem with running editor EMACS<snip> Mark, Take a look at: getOption("editor") and see what it returns. More than likely "EMACS" from what I see above. It should be in all lower case. That is 'emacs'. Take a look at your .Rprofile or perhaps at the 'EDITOR' or "VISUAL' shell variables to see where you have this set and edit accordingly. See ?edit for more information. Enjoy the book. My copy came just before I left for useR! and I have not had a chance to read it yet. Regards, Marc Schwartz