search for: r_pv

Displaying 10 results from an estimated 10 matches for "r_pv".

Did you mean: r_pc
2008 May 06
3
a R_PV problem
Dear all, When using gdb to debug my C code, I use R_PV to show the content of SEXP variables: SEXP sexp; // it is a data.frame SEXP colNames = getAttrib(sexp, R_NameSymbol); A strange thing is that after halting the program: (gdb) p R_PV(colNames) does not show the content of colNames. I am positive my code is right because if I insert "...
2009 Jun 25
1
R data inspection under gdb?
Hi, everyone. I'm trying to debug an R-module, written in C, and I'm using gdb for this. How can I print "standard" R objects from within C code? BTW, I'm familiar with the advice to use R_PV given in Writing R Extensions, but it's not working for me. E.g., I get (gdb) p R_PV(x) $1 = void and yet (gdb) p *x $2 = {sxpinfo = {type = 16, obj = 0, named = 0, gp = 0, mark = 0, debug = 0, trace = 0, spare = 0, gcgen = 0, gccls = 1}, attrib = 0x608f98, gengc_next_node = 0xa82328, gen...
2005 Jun 29
1
Viewing R objects in gdb
...gt;u.symsxp.pname->u.vecsxp.type.c Error: There is no member named vecsxp. where $a was set to be the attrib member of an SEXP. Could someone let me know what needs to be fixed for this to work? I imagine it's a typecast, but I haven't been able to put it together. (An example using R_PV to print the attributes of an SEXP would also be welcome, but I can probably figure that one out once I get this...) Duncan Murdoch
2006 Aug 30
0
Debugging with gdb
...ca4f5: file envir.c, line 1615. (gdb) signal 0 Continuing with no signal. > x <- 1 > get("x") Breakpoint 1, do_get (call=0x9443878, op=0x934bd54, args=0x9416408, rho=0x9417a54) at envir.c:1615 1615 checkArity(op, args); (gdb) p $1 History has not yet reached $1. (gdb) p R_PV(x) No symbol "x" in current context. (gdb)
2013 Oct 30
2
Huge performance difference between implicit and explicit print
Hi all, Can anyone help me understand why an implicit print (i.e. just typing df at the console), is so much slower than an explicit print (i.e. print(df)) in the example below? I see the difference in both Rstudio and in a terminal. # Construct large df as quickly as possible dummy <- 1:18e6 df <- lapply(1:10, function(x) dummy) names(df) <- letters[1:10] class(df) <-
2000 Jun 21
1
Port of R header files to Delphi
I'm in the process of porting R header files to Delphi. The short term aim is to be able to make calls into the R.dll from Delphi; the longer term aim is to play around with writing a Windows front-end with some of the features of the S-PLUS environment (e.g. scripts), and other features from other IDEs I've used (e.g. watch windows, popup values of variables selected by mouse, etc.)
2017 Oct 28
0
Cannot Compute Box's M (Three Days Trying...)
...p=0x61,ATT] [ASCII] [cached] "Petal.Length" @7f898ba99f78 09 CHARSXP g0c2 [gp=0x61,ATT] [ASCII] [cached] "Petal.Width" @7f898b9a3468 09 CHARSXP g0c1 [gp=0x61,ATT] [ASCII] [cached] "Species" You can also look at R objects while in a debugger like gdb using the R_PV() function; see Writing R Extensions for details if this is something available to you. > ncol(boxMVariable)? - 5 > > nrow(boxMVariable)?? - 150 > > typeof(boxMVariable) > > for (i in 1:5) print(typeof(boxMVariable[[i]])) > *I get:* > 1 ?> double > 2 ?> doub...
2017 Oct 29
2
Cannot Compute Box's M (Three Days Trying...)
...gth" >> @7f898ba99f78 09 CHARSXP g0c2 [gp=0x61,ATT] [ASCII] [cached] >> "Petal.Width" >> @7f898b9a3468 09 CHARSXP g0c1 [gp=0x61,ATT] [ASCII] [cached] "Species" >> >> You can also look at R objects while in a debugger like gdb using the >> R_PV() function; see Writing R Extensions for details if this is >> something available to you. >> >> ncol(boxMVariable) - 5 >> nrow(boxMVariable) - 150 >> typeof(boxMVariable) >> for (i in 1:5) print(typeof(boxMVariable[[i]])) >> I get: >> 1 ?> doub...
2017 Oct 29
0
Cannot Compute Box's M (Three Days Trying...)
...@7f898ba99f78 09 CHARSXP g0c2 [gp=0x61,ATT] [ASCII] [cached] >> "Petal.Width" >> @7f898b9a3468 09 CHARSXP g0c1 [gp=0x61,ATT] [ASCII] [cached] "Species" >> >> You can also look at R objects while in a debugger like gdb using the >> R_PV() function; see Writing R Extensions for details if this is >> something available to you. >> >> ncol(boxMVariable)? - 5 >> nrow(boxMVariable)?? - 150 >> typeof(boxMVariable) >> for (i in 1:5) print(typeof(boxMVariable[[i]])) >> /I g...
2017 Oct 28
2
Cannot Compute Box's M (Three Days Trying...)
Hey Duncan, Hard to debug? That's an understatement. Eyes bleeding.... In any case, I tried all your suggestions. To get "integer" for the final column, I had to change the code to get integers instead of strings. double[] d1 = ((REXPVector) ((RList) tableRead).get(0)).asDoubles(); double[] d2 = ((REXPVector) ((RList) tableRead).get(1)).asDoubles(); double[] d3 = ((REXPVector)