[Rd] debug/recover/.Internal

2016-04-04 Thread Mick Jordan
I was surprised by difference between using options(error=browser) and options(error=recover) when handling an error from sys.frame that I assume is related to the fact that the error is thrown from the .Internal and the 'which' parameter to the closure isn't available. > options(error=browser

Re: [Rd] Debug an R windows (Fortran) DLL within R with gdb?

2014-09-18 Thread Duncan Murdoch
quot;Re: Contents of R-devel digest..." >> >> >> Today's Topics: >> >> 1. Debug an R windows (Fortran) DLL within R with gdb? >> (Andre Mikulec) >> 2. Re: Debug an R windows (Fortran) DLL within R with gdb? >> (Duncan Murdoch) >> >

Re: [Rd] Debug an R windows (Fortran) DLL within R with gdb?

2014-09-17 Thread Andre Mikulec
--- > > Message: 1 > Date: Mon, 15 Sep 2014 17:25:49 -0400 > From: Andre Mikulec > To: "r-devel@r-project.org" > Subject: [Rd] Debug an R windows (Fortran) DLL within R with gdb? > Message-ID: > Content-Type: text/plain; charset="i

Re: [Rd] Debug an R windows (Fortran) DLL within R with gdb?

2014-09-15 Thread Duncan Murdoch
On 15/09/2014, 5:25 PM, Andre Mikulec wrote: > > Hi, > I have a Fortran 77 subroutine (dll). > > On windows XP, how would I 'debug it(Fortran) within R' using gdb? > > This is how I made it. > -- > > R CMD SHLIB main.f > > gfortran -m32 -O3 -mtune=core2 -c main.f -o

[Rd] Debug an R windows (Fortran) DLL within R with gdb?

2014-09-15 Thread Andre Mikulec
Hi,  I have a Fortran 77 subroutine (dll). On windows XP, how  would I 'debug it(Fortran) within R' using gdb? This is how I made it. -- R CMD SHLIB main.f gfortran -m32     -O3  -mtune=core2 -c main.f -o main.o gcc -m32 -shared -s -static-libgcc -o main.dll tmp.def main.o

[Rd] debug()/trace() to standard error?

2014-06-24 Thread Henrik Bengtsson
Does anyone know of a simple/neat way to make debug() and/or trace() send output to the standard error stream (not standard output)? Thanks, Henrik __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] debug package calling C++ code using valgrind

2013-01-14 Thread mullahmohammedomar
Hi, I am trying to debug a package which I helped to develop since we were notified by CRAN that our package randomly fails to run its examples. Hence, I reinstalled R with "with-valgrind-instrumentation=2" and installed our package with MAKEFLAGS="CFLAGS='-O0 -g3' CXXFLAGS='-O0 -g3'" R CMD INST

Re: [Rd] debug R objects at C level

2012-06-21 Thread Adrian Duşa
On Thu, Jun 21, 2012 at 3:02 PM, Duncan Murdoch wrote: > On 12-06-21 7:38 AM, Adrian Duşa wrote: >>[...] > > You seeing the value, not a pointer, but you are using an integer format to > display a real.  You need the %f or related format. > > I would also recommend using Rprintf() rather than prin

Re: [Rd] debug R objects at C level

2012-06-21 Thread Duncan Murdoch
On 12-06-21 7:38 AM, Adrian Duşa wrote: Dear R-devel, I am now at a debugging phase, and would like to inspect the (individual) values in an arbitrary R vector. It should be simple, but after hours of reading I am simply unable to find the right information. A possible C code is: ±±

[Rd] debug R objects at C level

2012-06-21 Thread Adrian Duşa
Dear R-devel, I am now at a debugging phase, and would like to inspect the (individual) values in an arbitrary R vector. It should be simple, but after hours of reading I am simply unable to find the right information. A possible C code is: ± # include # include # include SEXP

[Rd] debug: mtrace(fun, FALSE) doesn't work for me

2009-08-03 Thread Rune Schjellerup Philosof
Hi tmp <- function(t=1) t+1 mtrace(tmp) mtrace(tmp) #Re-applying trace... #Error in `[[<-`(`*tmp*`, 1, value = list(t + 1)) : # incompatible types (from list to expression) in [[ assignment I think this used to work on my computer. A month ago I upgraded R from r-base (2.9.0-4intrepid0) to 2.9.1

[Rd] debug

2009-07-27 Thread Robert Gentleman
Hi, I just committed a change to R-devel so that if debug is called on an S3 generic function, all methods will also automatically have debug turned on for them (if they are dispatched to from the generic). I hope to be able to extend this to S4 and a few other cases that are currently no

Re: [Rd] Debug with set.seed()

2007-06-02 Thread Patrick Burns
I think you will find that 'set.seed' does give you the same random state each time. That you don't get the same result each time implies a bug in your code. Looking for uninitialized variables would probably be a good start. Using valgrind under Linux would most likely find the error quickly.

[Rd] Debug with set.seed()

2007-06-01 Thread Tong Wang
HI, all I am debugging an R code with dynamically loaded function in it. It seems set.seed(n) does not give me the same random draws every time. Could somebody tell me what I should do to get the same outcome verytime ? I am not sure what infomation is relevent to this question , the f

Re: [Rd] [debug] package - Error in all.levs (PR#9638)

2007-04-30 Thread Prof Brian Ripley
>From the FAQ: Finally, check carefully whether the bug is with R, or a contributed package. Bug reports on contributed packages should be sent first to the package maintainer, and only submitted to the R-bugs repository by package maintainers, mentioning the package in the subject li

[Rd] [debug] package - Error in all.levs (PR#9638)

2007-04-30 Thread Piotr . Zuraniewski
Dear All, I encountered the following problem: fun1 <- function(x){ 2*cos(x) } >library(debug) > mtrace(fun1) > fun1(0.1) Error in all.levs[[j]] : subscript out of bounds > sessionInfo() R version 2.5.0 (2007-04-23) i386-pc-mingw32 locale: LC_COLLATE=Polish_Poland.1250;LC_CTYPE=Polish_Poland.1