similar to: R_NilValue blows up on Windows

Displaying 20 results from an estimated 3000 matches similar to: "R_NilValue blows up on Windows"

2019 Dec 15
4
source definition for R_NilValue/return from TYPEOF(R_NilValue)
Hello, for reasons I want to know the return value of TYPEOF(R_NilValue), I expect it to be NILSXP, but I can't find this documented anywhere. Ideally, I'd like to see the source definition of R_NilValue, but after fair bit of searching I cannot find an obviously location for this. Would someone please point me in the right direction? thanks -- CRICOS provider code 00123M
2009 Nov 18
1
R_NilValue and segfault.
Hello. I've been trying to wrap up the R_NilValue into OCaml-R. I nevertheless get a segfault. As I gathered, R_NilValue is declared in Rinternals.h: > /* Special Values */ > LibExtern SEXP R_NilValue; /* The nil object */ > LibExtern SEXP R_UnboundValue; /* Unbound marker */ > LibExtern SEXP R_MissingArg; /* Missing argument marker */ So, in my r_data.c
2014 Feb 26
1
help with gotoExitingHandler(R_NilValue, call, entry); . Implementation of error handling internally
Hello, I?m trying to leverage R_ToplevelExec to implement C level try/catch. The way it is implemented allows for running a function in a top level context. This context gets an empty handler stack, so either the function runs correctly or it jumps. When it jumps, it does not find a handler, so it jumps to the top level context. R does not allow me to call begin context and end context
2003 Apr 07
1
filtering ts with arima
Hi, I have the following code from Splus that I'd like to migrate to R. So far, the only problem is the arima.filt function. This function allows me to filter an existing time-series through a previously estimated arima model, and obtain the residuals for further use. Here's the Splus code: # x is the estimation time series, new.infl is a timeseries that contains new information # a.mle
2000 Oct 24
1
R_eval in tcltk library
Is there a method with the current tcltk library in R to call back an R function within the .Tcl("...") interpreter? I can't find anything documented, and I don't understand the usefulness of the .Tcl.callback() function. Browsing through the tcltk source code I found two functions R_eval and R_call that seem to take input from the .Tcl interpreter and parse them through the R
2001 Jul 09
1
problem loading saved image
I had an open session working in R and I regularly save the image with save.image(). However, after a period of inactivity of a few days. I quit the session. Now, when I try to restart R and load the same image I get the following result: > load("y:/grm/sdata/.rdata1") Error in load("y:/grm/sdata/.rdata1") : an xdr real data read error occured Can someone explain the cause
2001 Jul 11
1
Summary of Forcing variables types when using read.table
Thanks to Martyn Plummer and Vele Samak for taking the time to answer my problem. scan certainly will do the trick. However, having taken a look at the code for read.table, it seems to me that I might be able to add in a "what" argument and then just pass it down to the call to scan. But that won't be today's project . . . Dave Kane
2019 Sep 15
2
REprintf could be caught by tryCatch(message)
Dear R-devel community, There appears to be an inconsistency in R C API about the exceptions that can be raised from C code. Mapping of R C funs to corresponding R functions is as follows. error -> stop warning -> warning REprintf -> message Rprintf -> cat Rprint/cat is of course not an exception, I listed it just for completeness. The inconsistency I would like to report is
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.
2005 Apr 02
2
Building new graphic device drivers with g++
Dear Group, I'm trying to build a set of new graphic device drivers. I use the devNull example a a beginning point: $ R CMD SHLIB devNull.c gcc -shared -L/usr/local/lib -o devNull.so devNull.o (everything works OK) $ R CMD SHLIB devNull.cpp g++ -shared -L/usr/local/lib -o devNull.so devNull.o (everything works OK) The difficulties start when trying to compile manually. I compile the
2011 Sep 14
2
External pointers and an apparent memory leak
I'm using external pointers and seemingly leaking memory. My determination of a memory leak is that the R process continually creeps up in memory as seen by top while the usage as reported by gc() stays flat. I have isolated the C code: void h5R_allocate_finalizer(SEXP eptr) { Rprintf("Calling the finalizer\n"); void* vector = R_ExternalPtrAddr(eptr); free(vector);
2019 Sep 15
2
[External] REprintf could be caught by tryCatch(message)
Thank you Luke for prompt reply. Is it possible then to request a new function to R C API "message" that would equivalent to R "message" function? Similarly as we now have C "warning" and C "error" functions. Best, Jan On Sun, Sep 15, 2019 at 5:25 PM Tierney, Luke <luke-tierney at uiowa.edu> wrote: > > On Sun, 15 Sep 2019, Jan Gorecki wrote:
2007 Jul 23
1
CHAR(STRING_ELT( - OK but CHAR(asChar(STRING_ELT( - not, why?
Any idea why CHAR(asChar(STRING_ELT( produces NA whereas CHAR(STRING_ELT( gets a pointer to a string? It's generally expected that STRING_ELT should already be a character, but why the coercion does not work? Here is a simple example (consistent over R2.5.1-R2.6 rev 42284, I didn't check earlier versions, but it used to be different in 2.4): install.packages("inline")
2007 Aug 03
2
How to properly finalize external pointers?
Dear R .Call() insiders, Can someone enlighten me how to properly finalize external pointers in C code (R-2.5.1 win)? What is the relation between R_ClearExternalPtr and the finalizer set in R_RegisterCFinalizer? I succeeded registering a finalizer that works when an R object containing an external pointer is garbage collected. However, I have some difficulties figuring out how to do that in an
2019 Dec 16
0
source definition for R_NilValue/return from TYPEOF(R_NilValue)
On Sun, 15 Dec 2019 10:47:11 +0000 Dan Kortschak <dan.kortschak at adelaide.edu.au> wrote: > I'd like to see the source definition of R_NilValue, but after > fair bit of searching I cannot find an obviously location for this. > > Would someone please point me in the right direction? As far as I understand, the assignment to R_NilValue happens in src/main/memory.c:
2002 Oct 05
4
Implementation of S-Plus "nlmib" routine in R
Where can I find a package with an R implementation of the S-Plus "nlmib" general minimzation routine described in Venables & Ripley's "Modern Applie Statistics with S-Plus", 3rd Ed., pp 267 - 270? Thanks, David Stamps stamps.d.a at att.net -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2014 Dec 20
2
Unexplained difference between results of dppsv and dpotri LAPACK routines
Dear R contributors, Considering the following sample C code, that illustrates two possible uses of a Cholesky decomp for inverting a matrix, equally valid at least in theory: SEXP test() { int d = 2; int info = 0; double mat[4] = {2.5, 0.4, 0.4, 1.7}; double id[4] = {1.0, 0.0, 0.0, 1.0}; double lmat[3]; F77_CALL(dpotrf)("L", &d, mat, &d, &info); lmat[0] = mat[0]; lmat[1]
2007 Jul 10
1
How to preserve data across function calls in a library package
Hi, I am writing an R package with two functions in C++. So far everything works. Now, i would like to write a third function which would use a pointer (it is a pointer to a class object) created by first function. I tried placing this pointer outside of the function definitions (i.e to make it global) but when called in the 3rd function i get > *** caught bus error *** address 0x0,
2007 Jul 10
1
How to preserve data across function calls in a library package
Hi, I am writing an R package with two functions in C++. So far everything works. Now, i would like to write a third function which would use a pointer (it is a pointer to a class object) created by first function. I tried placing this pointer outside of the function definitions (i.e to make it global) but when called in the 3rd function i get > *** caught bus error *** address 0x0,
2007 Apr 03
3
Strange number produced by dnorm
Hi All, I just started to learn compiling C codes for R usage, and got a problem when I was playing with my 'hello world' code. #include <R.h> #include <Rdefines.h> #include <Rmath.h> SEXP test( ) { double x; x=dnorm(1.0,0.0,1.0,1); printf(" x value is: %d \n",x); return(R_NilValue); } I got the result : x value is: -466460838 Could