similar to: R in standalone application

Displaying 20 results from an estimated 8000 matches similar to: "R in standalone application"

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
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
2008 Sep 03
8
suggestion of new API function for embedded programming.
While doing some embedded programming and trying to figure out how to generate a hand coded SEXP equivalent of the line "t.test(x,conf.level=(1-p))$conf.int[2]" I had an idea for an addition to the embedded API. There are a number of hidden or static parse functions (R_ParseBuffer, R_Parse1Buffer, etc.) which take an IoBuffer* and returns a parsed tree. If one or more of these
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
2009 Jan 08
1
Callbacks seems to get GCed.
Dear list, I am trying to implement a publish-subscribe mechanism in for an embedded R interpreter. But somehow my registered closures seem to get collected by the GC, even though I have protected them. I have reducted my code to the following sample. Sorry if it is a little verbose. The first couple of call of calls still work, but at some point one of the callbacks (callback1 in my
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,
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:
2016 May 18
2
Latest R-devel build failing on OS X
Dear R-devel, The latest version of R-devel (05-17) is throwing an error for me when building on OS X (v 10.11.4): making Rembedded.d from Rembedded.c making dynload.d from dynload.c making system.d from system.c making sys-unix.d from sys-unix.c making sys-std.d from sys-std.c making X11.d from X11.c clang -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H
2010 Aug 03
1
License for Rembedded.h
Possibly more of a legal question than a technical development question, but here goes. In the doc\COPYRIGHTS file it is made clear that the intention is that you can write R packages and distribute them under licenses not compatible with GPL, by making the relevant header files available under the LGPL. This was an explicit change that was made in February 2001, and allows for DLLs that
2008 Jul 18
0
Rcpp from C++
Hi Sri, I haven't really elaborated on it having other stuff to prepare first, but as far as I got you first assign data to a vector: #include <R.h> #include <Rinternals.h> #undef R_INTERFACE_PTRS #include <Rembedded.h> #include "Rcpp.hpp" #include <R_ext/Parse.h> #include <Rinternals.h> #include <Rdefines.h> //assigning a vector SEXP
2016 May 18
3
Latest R-devel build failing on OS X
> Yes, the nightly build is broken in a similar, but different way. See below. > Both seem to be readline related, so Frederick Eaton's patches, which Martin committed yesterday are the likely culprit. I had actually tested them and things seemed to work, but it was on a different machine and not a completely clean build. Indeed a problem. I'm pretty sure that RL_UNSETSTATE()
2011 Aug 13
1
Latent flaw in SEXPREC definition
There seems to be a latent flaw in the definition of struct SEXPREC in Rinternals.h, which likely doesn't cause problems now, but could if the relative sizes of data types changes. The SEXPREC structure contains a union that includes a primsxp, symsxp, etc, but not a vecsxp. However, in allocVector in memory.c, zero-length vectors are allocated using allocSExpNonCons, which appears to
2016 Jan 27
0
symbol name conflict in grDevices on linux
It appears that grDevices (and perhaps other R libraries) is built without passing C_VISIBILITY to PKG_CFLAGS (-fvisibility=hidden), while other libraries (e.g. utils) do use the flag. This results in potential crashes on linux in situations like using embedded R in another application that happens to export a symbol named similarly to one defined in R's library, since the runtime linker
2006 Apr 09
2
using R in a java application
Dear All, I'd like to write a little application in java wich should pass some commands and data to R and displays the results (tables and charts) in a java frame. First I wanted to work with Omegahat's SJava but had lots of issues already at the installation. Then I heard some rumors that SJava generally is not a very active project and runs rather buggy (that's true?). So my
2010 Aug 06
1
Is R GPL or LGPL (or can I write a commercial front end to R)?
Note I'm not asking for any legal advice here obviously, simply what the intention of the R foundation is with regard to allowing commercial connection to R. I've looked at various threads on the r-devel archive and it looks like this may have been discussed before, but as far as could tell, not to any great resolution, and not, it seems, specifically covering this angle. In the
2009 Aug 25
1
R command line behaving funny
Hi I am unable to try out examples from the Rmetrics Ebook from the R command prompt. Below is an example of what happens: > Covariance<-cov(SWX.RET) Error in cov.timeSeries(SWX.RET) : no slot of name "Data" for this object of class "timeSeries" I have loaded Rmetrics and fPortfolio using the library function but still I get these errors. However, if I embed the R
2020 Oct 19
2
Is there any way to check the class of an ALTREP?
Benjamin, You happened to send a link which points to the OP's own package :) I think Jiefei would like to know how one can "officially" determine if an arbitrary ALTERP object belongs to a class that he owns. Regards, Denes On 10/19/20 10:22 AM, Benjamin Christoffersen wrote: > It seems as if you can you use the ALTREP macro as done in this > package:
2005 Jan 30
2
Rinternals.h and iostream don't play nice together'
Hi, Consider the following file. ******************************* foo.cc ******************************* #include <R.h> #include <Rinternals.h> #include <iostream> ******************************* R CMD SHLIB foo.cc gives scads of errors. I've use C++ extensively with R before (using C linkage) but not with Rinternals.h. I'm puzzled. The errors make no sense to me. Am
2008 Mar 15
1
Experimental R_has_slot() utility
Dear list, The utility "R_has_slot" mentioned in the file NEWS ("Experimental R_has_slot() utility supplementing R_do_slot()") appears to be missing from a fresh checkout of the development branch. $ svn up At revision 44759. $ grep -i has_slot `find include -name '*.h'` $ grep -i _slot `find include -name '*.h'` include/Rdefines.h:#define GET_SLOT(x, what)