similar to: a R_PV problem

Displaying 20 results from an estimated 400 matches similar to: "a R_PV problem"

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,
2007 Apr 07
2
Rf_PrintValue problem with methods::show
Hi, I think this is a bug (even though I can't find documentation explicitly saying that it should work). Basically, Rf_PrintValue(obj) fails when 'obj' is an S4 object that should be printed using show() rather than print(). From the error message I'm guessing that the need to use show is detected correctly but then show is not found. "cbind2" in the code below is just
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.)
2014 Oct 17
1
Making parent.env<- an error for package namespaces and package imports
I'd like to propose a change to the R language so that calling 'parent.env<-' on a package namespace or package imports is a runtime error. Currently the documentation warns that it's dangerous behaviour and might go away: The replacement function ?parent.env<-? is extremely dangerous as it can be used to destructively change environments in ways that violate
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) <-
2005 Jun 29
1
Viewing R objects in gdb
I'm trying to track down a bug in some experimental code, where an object's attribute is getting messed up. This means I'd like to examine R objects while within gdb. One of the things I'd like to do is to examine the names of all the attributes. This is exactly what an example in the R Extensions manual section 4.11.2 "Inspecting R objects when debugging" does,
2009 Aug 25
2
Clarifications please.
Hi I think I have asked these questions earlier, but I been able to find answers from the documentation (which I found poorly written in several places). Will someone be kind enough to give me answers and enlighten me? (as in explain with CODE?) I want to embed R in my application and use the fPortfolio package for carrying out risk management computations. Right now I'm reading the Rmetrics
2009 Jun 26
1
bug in Rf_PrintValue ?
I'm very green with R, so maybe this is not a bug, but it looks like one to me. The following program segfaults at the second call to Rf_PrintValue(). To failure depends on the value of the y-string. E.g., if I change it from "coverage" to, say, "COVERAGE", the segfault does not occur. /* bug.c */ #include <stdio.h> #include <Rinternals.h> #include
2011 Oct 28
2
[LLVMdev] [LLVM, llvm-diff] Question about FunctionDifferenceEngine and DiffConsumer::printValue
Hi all. I found next code when switch instruction differs: Engine.logf("right switch has extra case %r") << CaseValue; Where CaseValue is a ConstantInt object. Looking how logf works I found that it invokes DiffConsumer::printValue method for CaseValue. And here I found that CaseValue itself will never printed. On first look how DiffConsumer::printValue works it seems that for
2011 Oct 31
3
[LLVMdev] [LLVM, llvm-diff] Question about FunctionDifferenceEngine and DiffConsumer::printValue
Hi, Please find the attached patch for review. -Stepan. John McCall wrote: > On Oct 28, 2011, at 2:00 AM, Stepan Dyatkovskiy wrote: >> I found next code when switch instruction differs: >> >> Engine.logf("right switch has extra case %r")<< CaseValue; >> >> Where CaseValue is a ConstantInt object. Looking how logf works I found >> that it
2009 Feb 22
4
'unique' error message is printed despite silent=TRUE (PR#13547)
In 2.8.0/Windows Vista: When 'unique' gives a type error message, it prints out even if errors are being caught: > try(unique(quote(hello)),silent=TRUE) hello This comes from the .Internal unique routine: > try(.Internal(unique(quote(hello),NULL,NULL)),silent=TRUE) hello I guess it is using the internal equivalent of print rather than the internal equivalent of stop.
2011 Oct 29
0
[LLVMdev] [LLVM, llvm-diff] Question about FunctionDifferenceEngine and DiffConsumer::printValue
On Oct 28, 2011, at 2:00 AM, Stepan Dyatkovskiy wrote: > I found next code when switch instruction differs: > > Engine.logf("right switch has extra case %r") << CaseValue; > > Where CaseValue is a ConstantInt object. Looking how logf works I found > that it invokes DiffConsumer::printValue method for CaseValue. And here > I found that CaseValue itself will
2011 Nov 03
0
[LLVMdev] [LLVM, llvm-diff] Question about FunctionDifferenceEngine and DiffConsumer::printValue
ping. -Stepan. Stepan Dyatkovskiy wrote: > Hi, > > Please find the attached patch for review. > > -Stepan. > > John McCall wrote: >> On Oct 28, 2011, at 2:00 AM, Stepan Dyatkovskiy wrote: >>> I found next code when switch instruction differs: >>> >>> Engine.logf("right switch has extra case %r")<< CaseValue; >>>
2010 Jan 23
1
matrix to a C function
Hi the list, Is there a way to give a matrix to a C function, and then to use it as a matrix ? I write a function to print a matrix, but I use it as a vector : 1. void printMatrix(double *mTraj,int *nbCol, int *nbLigne){ 2. int i=0,j=0; 3. for(i=0 ; i < *nbLigne ; i++){ 4. for(j=0 ; j < *nbCol ; j++){ 5. Rprintf(" %f",mTraj[i * *nbCol + j]); 6. } 7.
2003 Feb 02
1
printing reals from C with digits -- once more
Thank for Brian D. Ripley for the answer to my previous question. My aim is to print single values from different real vectors with different digits option. This is quite a possible with Rprintf() but that one supprots printing format as C does, not in R native way (setting digits=7 or printing with "%12.7f" are two quite different things). So I would like to find something more
2001 Dec 05
4
Questions about piecewise spline fitting
Hi All, I want to fit a piecewise spline of degree 1, i.e. a spline consisting of a straight line over each piece. I downloaded the R package pspline, then I have following questions: 1. in the program, the degree of the spline is specified by 2*norder-1. Why do they adopt such scheme that we can only fit a spline with odd degree? 2. norder cannot be set to 1. Is there any specific reason
2008 Mar 19
1
R_ParseVector problem: it's cutting off after the decimal point
Dear all, my aim is to integrate R in an interactive visualisation software called Bulk Analyzer developed by VrVis (http://www.vrvis.at). the code: SEXP e, tmp; ParseStatus status; PROTECT(tmp = mkString("x <- c(1.234,-3.45)")); PrintValue(tmp); PROTECT(e = R_ParseVector(tmp, -1, &status, R_NilValue)); PrintValue(e); UNPROTECT(2); produces the following output: [1] "x
2010 Jul 19
4
[LLVMdev] Is va_arg deprecated?
Hi folk, I'm writing a set of small C code to verify whether my pass handle some instruction correctly. One of the instruction I want to test is "va_arg", but compiling my variadic function does not generate any va_arg instruction. Is va_arg deprecated? Will va_arg instruction ever be generated by any front-end? The source code and llvm instructions are appended as follows. the
2020 Sep 11
4
Garbage collection of seemingly PROTECTed pairlist
I want to write an R function using R's C interface that takes a 2-column matrix of increasing, non-overlapping integer intervals and returns a list with those intervals plus some added intervals, such that there are no gaps. For example, it should take the matrix rbind(c(5L, 6L), c(7L, 10L), c(20L, 30L)) and return list(c(5L, 6L), c(7L, 10L), c(11L, 19L), c(20L, 30L)). Because the output is
2003 Jan 29
1
printing reals from C with digits
Hi, I want to print real numbers in C code with different values for digits. How to do that? As I have understood, what I should do is to call StringFromReal() which calls FormatReal(), that one suggests the parameters (width, decimal places and exponential form). FormatReal() includes eps = pow(10.0, -(double)R_print.digits); So I guess I have to change the value of R_print.digits.