similar to: [R] browser/debug and for loop (PR#1721)

Displaying 20 results from an estimated 10000 matches similar to: "[R] browser/debug and for loop (PR#1721)"

2002 Jun 28
1
browser/debug and for loop
Dear R-Users, It seems like once one invokes browser() inside a loop and steps through the body using 'n' any subsequent loop will be "intercepted" by debug() function. Here is exactly what I mean # fresh R session # run a loop that has browser() inside the body > for (i in seq(5)) { browser(); print(i) } for (i in seq(5)) { browser(); print(i) } Called from: NULL
2004 Sep 07
0
RE: [R] [R] interaction of options(error=) and try(): was how to debug a sudden exit in non-interactive mode
Hi, First of all let me thank Prof. Ripley and Peter Dalgaard for their suggestions about ways to debug my initial problem. Debugger() suggested by Prof. Ripley could have provided the definitive answer hadn't it itself be somewhat flaky. Anyway it still helped a lot to pinpoint the problem. The problem turned out to be an old R "deficiency" that showed up again when I used the
2005 May 06
0
FW: distance between distributions
Sorry, forgot to send this to the list originally. -----Original Message----- From: Mike Waters [mailto:dr.mike at ntlworld.com] Sent: 06 May 2005 18:40 To: 'Campbell' Subject: RE: [R] distance between distributions -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Campbell Sent: 06 May 2005 11:19 To:
2005 Mar 22
1
documentation on seek *does not* need update
Well, "integer" is also a storage.mode in R. It is not immediately clear which meaning the help page uses. I guess some extra elaboration would be helpful. Anyway, thank you for the clarification, Vadim > -----Original Message----- > From: Prof Brian Ripley [mailto:ripley@stats.ox.ac.uk] > Sent: Tuesday, March 22, 2005 9:54 AM > To: Vadim Ogranovich > Cc:
2004 Sep 24
1
algorithm reference for sample() - Knuth
Thank you for the reference to Knuth. Indeed in vol. 2 he has a > -----Original Message----- > From: Tony Plate [mailto:tplate@blackmesacapital.com] > Sent: Friday, September 24, 2004 8:05 AM > To: Vadim Ogranovich > Subject: Re: [Rd] algorithm reference for sample() > > Have you tried looking in Knuth's books on computer > algorithms? (They are classics for good
2008 Apr 14
1
clean-up actions after non-local exits
Dear R-devel, Some time ago I started a thread that boiled down to clean-up actions after non-local exits in R, see below. I wonder if there has been any progress on this? R-ext 2.6.1 doesn't say much on the subject. How, for example, do people deal with a situation where their C (C++) function opens a file and then receives a signal or longjump-s on error(), how do they make sure the
2005 May 04
1
Cost of method dispatching: was: when can we expect Prof Tierney's compiled R?
> -----Original Message----- > From: Prof Brian Ripley [mailto:ripley@stats.ox.ac.uk] > Sent: Wednesday, April 27, 2005 1:13 AM > To: Vadim Ogranovich > Cc: Luke Tierney; r-devel@stat.math.ethz.ch > Subject: Re: [Rd] RE: [R] when can we expect Prof Tierney's > compiled R? > > On Tue, 26 Apr 2005, Vadim Ogranovich wrote: > ... > > The arithmetic shows
2005 May 06
1
distance between distributions
Hi, This is more of a general stat question. I am looking for a easily computable measure of a distance between two empirical distributions. Say I have two samples x and y drawn from X and Y. I want to compute a statistics rho(x,y) which is zero if X = Y and grows as X and Y become less similar. Kullback-Leibler distance is the most "official" choice, however it needs estimation of
2005 Apr 27
1
RE: [R] when can we expect Prof Tierney's compiled R?
Luke, Thank you for sharing the benchmark results. The improvement is very substantial, I am looking forward to the release of the byte compiler! The arithmetic shows that x[i]<- is still the bottleneck. I suspect that this is due to a very involved dispatching/search for the appropriate function on the C level. There might be significant gain if loops somehow cached the result of the initial
2004 Feb 25
0
books:
Not precisely an answer to your question but here are some OO R links that I have collected over time. Not sure if all these links still work. <a href="http://www.stat.wisc.edu/~st771-1/slides/wk2-4.pdf">Bates</a> | <a href="http://www.maths.lth.se/help/R/">Bengtsson</a> | <a
2002 Dec 05
1
writing to gzfile: segmentation fault (PR#2347)
Full_Name: Vadim Ogranovich Version: Version 1.6.0 (2002-10-01) OS: Red Hat 7.1 Submission from: (NULL) (209.99.241.1) The following sequence of commands crashes my R session. The first weirdness happens after the second command that appears not to change the "foo.gz" file, no error generated. > con <- gzfile("foo.gz", open="w"); cat("goo\n",
2010 Oct 15
1
calling browser on error
Dear R-developers, I am trying to figure out a way to call browser() when an error occur, and naturally I want the browser() to be called in the environment of the error. I tried something simple in vain: > f <- function() { x <- 1; stop('ok') } > tryCatch(f(), error=browser()) Called from: tryCatch(f(), error = browser()) ## if browser() was called in the local environment
2009 Apr 09
0
bug/suggestion: debugger should respect option "deparse.max.lines" when printing the call (PR#13647)
Full_Name: John Brzustowski Version: 2.8.1 OS: linux Submission from: (NULL) (67.71.250.146) When entering a debug()'ed function, the call printout is not limited by options()$deparse.max.lines as it is when one uses browser() or trace(). Should it be? If so, here's a patch: diff -cr R-2.8.1/src/library/base/man/options.Rd R-2.8.1-patched/src/library/base/man/options.Rd ***
2004 Sep 03
1
how to debug a sudden exit in non-interactive mode
Hi, I have a piece of R code that calls mgcv::gam. The code runs fine in the interactive mode, but terminates R w/o a single message when run non-interactively. Though I think I should be able to locate the problem by brute force I'd appreciate an advise how to do it more intelligently using R debugging tools. At this time I only know that it has something to do with me loading my custom
2013 May 25
0
segfault when using browser() in Rprofile.site
Hi. It seems that if I put a browser() in my Rprofile.site, I get a segfault. This happens on several machines, several versions of R. Here it the valgrind output when using revision 62797: ==31314== Memcheck, a memory error detector ==31314== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al. ==31314== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info ==31314==
2018 May 23
0
debugonce() functions are not considered as debugged
On 05/22/2018 06:07 PM, G?bor Cs?rdi wrote: > On Mon, May 21, 2018 at 5:01 PM Tomas Kalibera <tomas.kalibera at gmail.com> > wrote: > [...] >> Do you have a good use case when it would be useful to query/unset the >> mark for debugonce? > Well, I suppose the same use cases when it is useful to query/unset the > other debug > mark. I asked because the use cases
2018 Apr 28
3
debugonce() functions are not considered as debugged
debugonce() sets a different flag (RSTEP), and this is not queried by isdebugged(), and it is also not unset by undebug(). Is this expected? If yes, is there a way to query and unset the RSTEP flag from R code? ? f <- function() { } ? debugonce(f) ? isdebugged(f) [1] FALSE ? undebug(f) Warning message: In undebug(f) : argument is not being debugged ? f() debugging in: f() debug at #1: { }
2018 May 21
0
debugonce() functions are not considered as debugged
debug(fun) marks "fun" for debugging, it makes sure that whenever "fun" is called, the debugger is entered undebug(fun) removes this mark; it won't stop any current debugging of that function isdebugged(fun) tells whether this mark is set or not; it does not tell whether "fun" is currently running in a debugger/browser debugonce(func) adds a different mark to
2001 Oct 09
2
list of functions flagged with debug() or trace()
Hello all, Since I got no answer to my first mail, I suspect I did not formulate my question adequately, so I try again. In R, one can debug or trace a function 'foo' with debug(foo) or trace(foo), respectively. This leads to a special treatment of the function 'foo' until one enter undebug(foo) or untrace(foo). I would like to know if there is a convenient way to know at any
2005 May 07
4
how to add method to .Primitive function
Hi, I tried to write the dim method for the list class, but R doesn't seem to dispatch to it: > dim.list = function(x) c(length(x[[1]]), length(x)) > dim(list(1)) NULL > dim.list(list(1)) [1] 1 1 What is the correct way of registering dim.list with .Primitive("dim")? Thanks, Vadim [[alternative HTML version deleted]]