similar to: calling Rf_initEmbeddedR twice gives an error

Displaying 20 results from an estimated 300 matches similar to: "calling Rf_initEmbeddedR twice gives an error"

2010 Sep 09
0
calling Rf_initEmbeddedR error
Hi all, I have a problem of Rf_initEmbeddedR function. I've tried with: try { int Argc1 = 1; char *Argv1[] = {"Rtest_1"}; int Argc2 = 1; char *Argv2[] = {"Rtest_2"}; // Init R(first) Rf_initEmbeddedR(Argc1, Argv1); // R package load SEXP e = R_NilValue; SEXP r = R_NilValue; PROTECT(e =
2008 Aug 30
0
R embedded reinitialization error (PR#12644)
Full_Name: R Embedder Version: 2.7.2 OS: win XP SP 2 Submission from: (NULL) (83.25.35.249) I'm having problems using embedded R. I try to adapt examples from "tests/Embedding/". Everything works fine except when I try to reinitialize R for the second time in the same program. I need to reinitialize correctly because my code is some kind of .dll plugin to an external application.
2012 Nov 14
2
R.dll Reference Guide?
Is there a reference guide to the complete set of functions and their arguments that are available in the R.dll library for Windows, i.e. the set of functions that includes "Rf_initEmbeddedR" and "Rf_endEmbeddedR" listed in section 8.2.2 of the Writing R Extensions manual? This may be more of an indictment of my lexical searching skills than anything else, but I was unable to
2006 Aug 31
1
Overriding InitTempDir
For embedded projects, one may want to eliminate the per-session temp directory created by InitTempDir() and just use a system-specific temp directory. Here's my solution: extern char *R_TempDir; void my_InitTempDir() { char *tmp; if (R_TempDir){ if (rmdir(R_TempDir) != 0){ perror("Fatal Error: could not remove R's TempDir!");
2009 Sep 16
2
I want to get a reference to this time series object
I'm trying to get a reference to this object in C SWX.RET[1:6,c("SBI,"SPI","SII")] While i am able to access and use a plain SWX.RET object, I'm getting confused on how to create an object with the array subscripts like above. Here is what I tried to do. It doesn't work because "[" is obviously not an operation or function on SWX.RET. So how do I
2013 Oct 16
1
Parallel R expression evaluations
Hi all, I am using R-3.0.1 under Linux platform to embed R into my C++ code. I am facing an error while executing more than 1 R-expressions parallelly. I am executing round(X) and abs(X) parallelly on a set of 50 input rows which resulted in segmentation fault after getting the following errors. Error: unprotect_ptr: pointer not found Error: argument to 'findVar' is not an environment
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
2010 Nov 19
1
JRI and error message from R_isMethodsDispatchOn
Dear R users, I have a small project written in Java and need some statical tools. Therefore, I used JRI (in rJava package) as an interface between R and Java to write some wrappers for my work. However, I received error message from R while I have more than one java method which wraps R: Error in .Call("R_isMethodsDispatchOn", onOff, PACKAGE = "base") : Incorrect
2005 Sep 22
1
Rf_initEmbeddedR in Windows
Hi All My C++/linux program uses Rf_initEmbeddedR to start R and then calls some R functions. Now I try to port it to Windows. Give the fact that Rf_initEmbeddedR is missing in Windows, I try to use the implmentation in Rserve by Simon Urbanek. When I build in MS Visual Studio, I get the following linking error error LNK2019: unresolved external symbol __imp__putenv referenced in function
2007 Aug 16
0
call R function in c++ program
Hi all I don't know if my message are correct in this forums. I create a program in c++ who use statistical function. I want to execute this function in R (in particular for use packages ade4, lattice, bioconductor...) Until now, my program work for simple function ("plot", "rnorm"...) but I can't use library My class are : // in constructor int argc = 1;
2015 Feb 05
0
How to unload R.dll successfully by FreeLibrary
hi, I've some C++ code which try to load R.dll and execute some R command, then unload R.dll, yet it seems fail to unload it, so second time to call the function hangs since it is trying to Initialize R again(this is not allowed as documented). Anyone can tell me why, thanks. //the following is my c++ code, used in a Visual Studio 2012 Console Application #define ORAPI__cdecl
2012 Apr 18
1
C - R integration: Memory Issues
Hi all, I am a PhD student and I am working on a C project that involves some statistical calculations. So, I tried to embed R into C, in order to call R functions from a C program. My program seems to get the correct results from R. However, it appears to have a lot of memory allocation issues, in contrast to the small amounts of memory that my code allocates. Some additional info
2010 Apr 17
0
Error when creating 2 R instances on the same context.
Hello, I'm getting an error when trying to create a secound R instance on the same context, in my system R calls Fortran code that calls C++ code that ultimately call R code again, but on this secound call I get this error. Error in .Call("R_isMethodsDispatchOn", onOff, PACKAGE = "base") : Incorrect number of arguments (2), expecting 1 for R_isMethodsDispatchOn Error in
2009 Sep 29
3
How do I access class slots from C?
Hi I'm trying to implement something similar to the following R snippet using C. I seem to have hit the wall on accessing class slots using C. library(fPortfolio) lppData <- 100 * LPP2005.RET[, 1:6] ewSpec <- portfolioSpec() nAssets <- ncol(lppData) setWeights(ewSpec) <- rep(1/nAssets, times = nAssets) ewPortfolio <- feasiblePortfolio( data = lppData, spec = ewSpec,
2011 Mar 08
3
How to disable R's crash prompt
Dear R devel, I have a C++ app that calls into embedded R to perform some analytic calculations. When my app encounters a segmentation fault, R always prints the following crash prompt and asks me to enter an action: *** caught segfault *** address 0x8, cause 'memory not mapped' Possible actions: 1: abort (with core dump, if enabled) 2: normal R exit 3: exit R without saving workspace
2003 Dec 09
2
p-value from chisq.test working strangely on 1.8.1
Hello everybody, I'm seeing some strange behavior on R 1.8.1 on Intel/Linux compiled with gcc 3.2.2. The p-value calculated from the chisq.test function is incorrect for some input values: > chisq.test(matrix(c(0, 1, 1, 12555), 2, 2), simulate.p.value=TRUE) Pearson's Chi-squared test with simulated p-value (based on 2000 replicates) data: matrix(c(0, 1, 1,
2016 Jul 18
1
failed to assign RegisteredNativeSymbol for splitString
I saw a warning from R that I don't fully understand. Here's one way to reproduce it: $ /usr/local/pkg/R-3.2-branch-20160718/bin/R --version | head -n 3 R version 3.2.5 Patched (2016-05-05 r70929) -- "Very, Very Secure Dishes" Copyright (C) 2016 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu/x86_64 (64-bit) $
2012 Aug 20
0
Problem with initializiing R main loop under Windows (R.dll-version: 2.15.1)
Dear R-developers, even though I may not be the first one to encounter the problem described below, I would really appreciate some help or a link to a forum where this topic is being discussed. Probably I am simply misinformed on the usage of structRstart but see for youselve. I did check multiple forums and the whole internet on the topic without success. I am using the shared library version
2008 May 09
0
Incorrect fix for PR#9316: Cook's Distance & plot.lm
Bug PR#9316 noted an inconsistency between the Cook's distance contours on plot.lm(x, which = 5) and the values given by cooks.distance(x) -- as shown in plot.lm(x, which = 4) -- for glms: http://bugs.r-project.org/cgi-bin/R/Analyses-fixed?id=9316;user=guest;selectid=9316 The suggested fix was to modify the contour levels by a dispersion factor, implemented as follows: dispersion <-
2010 May 25
0
R without dynamic libraries: anyone working on this?
Hi all, I'm building R for a context where I can't load dynamic libraries. I've configured the build appropriately but from what I can tell it's not currently supported: there are compile errors here and there and the mechanism for looking up base symbols (CFunTab in Rdynload.c??) seems to have been ripped out. I'm going to add enough code so that R_FindSymbol will at least