Displaying 7 results from an estimated 7 matches for "rcppvector".
2015 Feb 01
2
invoking R function in C++ in parallel
On Sat, Jan 31, 2015 at 7:05 PM, Dirk Eddelbuettel <edd at debian.org> wrote:
[...]
> - either work in something like OpenMP and run in multiple threads that
> remain /completely/ shielded from R, ie no R calls, and not even R data
> types as you cannot trigger gc() calls from different threads
>
I think you can use R objects, as long as you don't call R functions on
2009 Dec 13
1
How to resolve include Rcpp.h problems?
...=gnu99 -I/usr/share/R/include -fpic -g -O2 -c fifrt.c -o
fifrt.o
g++ -I/usr/share/R/include -fpic -g -O2 -c RCPP_test.cpp -o
RCPP_test.o
RCPP_test.cpp:1:18: erreur: Rcpp.h : No such file or directory
RCPP_test.cpp: In function ?SEXPREC* readRIntVec(SEXPREC*)?:
RCPP_test.cpp:14: erreur: ?RcppVector? was not declared in this scope
RCPP_test.cpp:14: erreur: expected primary-expression before ?int?
RCPP_test.cpp:14: erreur: expected `;' before ?int?
make: *** [RCPP_test.o] Erreur 1
ERROR: compilation failed for package 'rply'
** Removing '/home/amine/R/r-eclipse/rply.Rcheck/rply&...
2015 Feb 01
0
invoking R function in C++ in parallel
...eric vector, you can do?
| double *cvec = REAL(vec);
| and then use cvec in your thread(s).
You and I are saying the same thing here: you call it read-only access; I
called ot "do not use R types". We recommend the same approach in other
places: instantiate std::vector<double> from RcppVector, don't use R calls.
My recommendation is to make it pretty plain: do not call R functions. Use
other types. There are equivalent read-only constructors for some relevant
data types.
Recall that OP, in the parts you chose not to quote, asked to call back to R
in a multithreaded way. And we bot...
2008 Dec 03
0
Rcpp package relaunched
...s vectors and vectors of vectors),
o int (scalar as well as vectors and vectors of vectors), string,
o STL vector types and vector<vector> types of int and double
o STL vector of strings
o internal Rcpp types RcppDate, RcppDateVector, RcppDatetime,
RcppDatetimeVector, RcppStringVector, RcppVector of int or double,
RcppMatrix of int or double, RcppFrame
Rcpp was initially written by Dominick Samperi as part of his contributions
to RQuantLib, and later released as a standalone package (under both the Rcpp
and RcppTemplate names). Its development had ceased in late 2006.
As of November...
2008 Dec 03
0
Rcpp package relaunched
...s vectors and vectors of vectors),
o int (scalar as well as vectors and vectors of vectors), string,
o STL vector types and vector<vector> types of int and double
o STL vector of strings
o internal Rcpp types RcppDate, RcppDateVector, RcppDatetime,
RcppDatetimeVector, RcppStringVector, RcppVector of int or double,
RcppMatrix of int or double, RcppFrame
Rcpp was initially written by Dominick Samperi as part of his contributions
to RQuantLib, and later released as a standalone package (under both the Rcpp
and RcppTemplate names). Its development had ceased in late 2006.
As of November...
2006 Jan 10
3
Issue with c++ .C call
I am still having some difficulties with connecting R to a C++ function. I
am able to call the function as expected after compiling the shared library
and such. However, the call to the function is via .C; parameters from the
.C call are not being passed correctly to the function. As an example, I
have attached a GDB run of the code. I set a breakpoint on entry to the
function I am calling
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,