kw.statr at gmail.com
2008-Jun-11 14:50 UTC
[Rd] [ESS] browser() exits when not desired, in three different scenarios (PR#11634)
Tim, I have reported some similar issues a while back and there was some discussion on this topic: http://tolstoy.newcastle.edu.au/R/devel/06/03/4609.html Good luck, Kevin On Tue, Jun 10, 2008 at 6:47 PM, Tim Hesterberg <timhesterberg at gmail.com> wrote:> Here are three different scenarios in which the browser() exits > when I don't want it to. These are all related to the browser > accepting either c or (return) to exit. I would like an option > to turn off the (return) behavior in order to avoid these problems. > > > > # Case 1 - when calling help > # Note, I am using ESS in emacs; this is probably an interaction > # with ESS handling of ? help. >> f <- function(x){ > + browser() > + length(x) > + } >> f(1:4) > Called from: f(1:4) > Browse[1]> ?rep > [1] 4 >> > # The help was given, but the browser exits. > > > # Case 2 - when pasting in a command that stretches over > # two lines. > # With f defined as above, call f, select the following two lines in > # an emacs buffer (using c-w clipboard-kill-ring-save) and yank them > into the *R* buffer: > mean(x, > trim = .2) > # The result: >> f(1:4) > Called from: f(1:4) > Browse[1]> mean(x, > trim = .2) > > mean(x, > + trim = .2) > [1] 2.5 > Browse[1]> > [1] 4 >> > # The multi-line command was echoed (twice--this is probably an ESS > problem or misconfiguration), ran, and the browser exits. > > > # Case 3 - when pasting in a line at a time, including blank lines. > I like to include blank lines in my code for readability. > When I paste in multiple lines, the blank lines cause the browser > to exit. > > I reported case 3 before; it is the single thing that bothers > me most about R. Someone suggested using > ess-eval-line-and-step in ESS; this is nice for one line, but does not > support C-u for sending multiple lines, and doesn't apply when > I'm not using ESS. > > Tim Hesterberg > > --please do not edit the information below-- > > Version: > platform = i486-pc-linux-gnu > arch = i486 > os = linux-gnu > system = i486, linux-gnu > status > major = 2 > minor = 7.0 > year = 2008 > month = 04 > day = 22 > svn rev = 45424 > language = R > version.string = R version 2.7.0 (2008-04-22) > > Locale: > LC_CTYPE=en_US;LC_NUMERIC=C;LC_TIME=C;LC_COLLATE=C;LC_MONETARY=C;LC_MESSAGES=en_US;LC_PAPER=en_US;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US;LC_IDENTIFICATION=C > > Search Path: > .GlobalEnv, package:stats, package:graphics, package:grDevices, > package:utils, package:datasets, package:showStructure, package:Rcode, > package:splus2R, package:methods, Autoloads, package:base > > [[alternative HTML version deleted]] > > ______________________________________________ > ESS-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/ess-help >
Seemingly Similar Threads
- browser() exits when not desired, in three different scenarios (PR#11623)
- (PR#11537) help (using ?) does not handle trailing whitespace
- save() should not overwrite a file if an error occurs (PR#12583)
- help (using ?) does not handle trailing whitespace (PR#11537)
- scoping problem when calling lm(precomputed formula, weights) from function (PR#11540)