similar to: Calling R from C - part way there but need a push!

Displaying 20 results from an estimated 3000 matches similar to: "Calling R from C - part way there but need a push!"

2009 Sep 03
1
Running an expression 1MN times using embedded R
Hello, I'm evaluating this expression expression({ for(x in 1:5){ .Call('rh_status','x') }}) a million times from a program with R embedded in it. I have attached reproducible code that crashes with Program received signal SIGSEGV, Segmentation fault. 0x00002b499ca40a6e in R_gc_internal (size_needed=0) at memory.c:1309 1309 FORWARD_NODE(R_PPStack[i]); Current language:
2010 May 06
1
R on kdeedu-svn library problem
Hello, I am new to this list. ?I am trying to compile the current svn version of kdeedu on an amd64 linux machine ?which uses R and I get the following compiler output. ------------------------------------------- ?79%] Building CXX object cantor/src/backends/R/rserver/CMakeFiles/cantor_rserver.dir/rserver.o $SOURCES/kdeedu/cantor/src/backends/R/rserver/rserver.cpp: In member function
2011 Jun 16
4
Controlling stdin and stdout in an embedded R instance
Hello, I am very new to R but my question is with respect to the C API for working with an embedded R console. I have been able to start and stop an embedded R console from within a C program as well as use the API to execute commands in it. I am seeking a mechanism to individually send native R commands to an embedded console and then consume the output of these commands. Specifically, I
2007 Apr 03
2
R callbacks
Hi, I'm trying to understand (mostly from the R-exts manual) how to use the callbacks declared in Rinterface.h. As a first attempt, I'm trying to redefine ptr_R_WriteConsole in a very trivial manner. Here's my code: --------------- $ cat altr.c int Rf_initialize_R(int ac, char **av); #define R_INTERFACE_PTRS 1 #include <Rinterface.h> extern int R_running_as_main_program;
2008 Apr 24
1
Calling R functions with multiple arguments from C
Hi, I'm writing a C function that has to call a R function with multiple arguments. I've read the relevant section in Writing R Extensions, and searched the R site, mailing lists as well as rseek. I managed to call the function, but I'm now having trouble creating the argument list. I tried to create a pairlist of the arguments and send it to the R function. The R function however
2010 Jul 21
1
Plot window does not update in embedded code
Dear list, I am trying to embed R into a C++ program. After some tinkering, reading the documentation and browsing the source code I have this more or less working. A very very condensed and very simplified version of the code is included below. The program can create plots. However, after the plot is initially drawn it is no longer updated. When scaling or updating the plot the window becomes
2009 Nov 11
1
fisher.test negative value error
Hi all, I am new to python, R and rpy2. I having few errors when I am using 'fisher.test' function where I am struck now. Please help to fix these bugs. My code for fisher.test goes this way *from rpy2 import * import rpy2.robjects as robjects def fisherExact(a,b,c,d): v = [a,b,c,d] m = robjects.r['matrix'](v,2,2) s = robjects.r['fisher.test'](m) return s *
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
2013 Aug 28
1
Error when using buildVignettes()
Dear all, When running function 'testQAReport()', which uses function 'buildVignettes()' to create a pdf-file I get the following error: > source("testQAReport.R") > testQAReport() Error in .get_package_metadata(pkgdir) : Files 'DESCRIPTION' and 'DESCRIPTION.in' are missing. Since I did not get this error in earlier versions of R, could you
2004 Aug 18
3
R as shared library
Hello folks, I'm embarking on a project to embed R into the Apache web server, and I'd like your help. Currently, I'm looking for a way for R code to call back into a shared library from which the R shared library was loaded. Essentially, apache starts and loads mod_R.so which runs an initialization routine which calls Rf_initEmbeddedR() and the following code: /* override to
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.
2014 Oct 12
1
Is this an incorrect use of the R-API?
Hi, I am trying to create a small extension for R here for embedding the current time on the R prompt: https://github.com/musically-ut/extPrompt Things seem to be working overall, but `R CMD check .` raised a warning: > File '[truncated]..Rcheck/extPrompt/libs/extPrompt.so?: > Found non-API call to R: ?ptr_R_ReadConsole? > > Compiled code should not call non-API entry points in
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
2004 Nov 16
2
FireWire Security issues
Hello, looking into the issue described in the advisory below I wonder how to tackle this issues. Primarily I ask myself * is there any reason not to filter all physical memory access by default * what would be the appropriate way to change the filter set? a sysctl? Regards Maximillian Dornseif FireWire/IEEE 1394 direct memory access - CAN-2004-1038 Advisory URL:
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; >>>
2005 Oct 17
1
RFC: API to allow identification of warnings and errors in the output stream
Dear R developers, this mail is basically a summary / clarification of some previous mails I sent to this list last week (subject "Catching warning and error output"). Duncan Murdoch pointed out that these were badly organized, and suggested I repost, collecting the main points previously spread out between several mails. Problem statement: In an application embedding R, I would
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
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.)
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 "PrintValue(colNames);" in the c code,