I am sending this again, cause when I forward to rcpp-devel, the gmail put
the previous message first.
Not expect to fix the problem this easy. I just get a chance to look into
the "Module_generated_method.h" code and Romain left a "const char
*" before the valid method. So here below is the fix.
mizer::get) )
;
}
Thanks.
-- Forwarded message --
From: Chaomei Lo
Date: Wed, Aug 27, 2014 at 10:17 AM
Subject: overloaded methods
To: "rcpp-devel@lists.r-forge.r-project.org" <
rcpp-devel@lists.r-forge.r-project.org>
Sorry to bug you all, I accidently sent a wr
Sorry to bug you all, I accidently sent a wrong message few minutes ago.
I have posted this problem few days ago, can anybody helps me with this
compilation error ? I do not have idea why there is no matching function...
It is from Romain's example -
http://lists.r-forge.r-project.org/pipermail/rc
ector (Randomizer::*)(int)
)(&Randomizer::get) , &get_int_valid )
.method( "get" , ( List (Randomizer::*)(IntegerVector)
)(&Randomizer::get) )
;
}
------ Forwarded message --
From: Chaomei Lo
Date: Sat, Aug 23, 2014 at 12:51 PM
Su
Hi, Romain,
I have created overloaded methods have argument types like blow.
fn(List)
fn(List, NumericMatrix)
fn(List, DataFrame)
The first function works fine, and adding the second one with different
number of arguments works fine too. With the third one added, it compiled
fine but when I invo
> Cheers,
> Kevin
>
>
> On Thu, Jul 10, 2014 at 5:09 PM, Chaomei Lo wrote:
>
>> I have a R data frame pass to the Rcpp function, for example in below-
>>
>> void myDataFrame(Rcpp::DataFrame df) {
>>
>> }
>>
>> I would need to know t
I have a R data frame pass to the Rcpp function, for example in below-
void myDataFrame(Rcpp::DataFrame df) {
}
I would need to know the column names first before I retrieve the data but
df.colnames() does not work but the df.length() and df.nrows() work.
Thanks for help !
Chaomei
_
Cpp) directive to NAMESPACE
>> copied /people/d3j508/Wyoming/test_module.cpp to src directory
>> added example src file using Rcpp attributes
>> compiled Rcpp attributes
>> added Rd file for rcpp_hello_world
>> copied the example module file
Thanks a lot.
C
Hi, Romain,
Please see my previous message in below. When I created a package, the
RcppExports.cpp did not contain any info about the class "Randomizer".
Would you please give a advice ?
Thanks in advance.
Chaomei
-- Forwarded message ------
From: Chaomei Lo
Date: Tue, J
I use Romain's example as follows (after /// line). It works fine with the
sourceCpp(..). However, with the package I created, it loaded fine but I
got this error below when I instantiate the class. -Thanks for help.
> library("testModule", lib.loc="/people/me/.Rlibs")
> r <- new( Randomizer )
E
Hi, Romain,
Thanks a lot for the quick reply !!
Suffix with << L >> works for me for both Rf_isInteger and is.
On Mon, Jun 9, 2014 at 12:43 PM, Romain François
wrote:
>
> Le 9 juin 2014 à 21:40, Chaomei Lo a écrit :
>
> >
> > I have a R list something lik
I have a R list something like this -
op=list(a=200, b="test", c=4.5)
when I pass it as an argument to Rcp Export function which the code looks
like this in below.
int n = xlist.length();
for (int I=0; I < n; I++) {
SEXP s = xlist[I];
if (Rf_isInteger(
geExporter< Teuchos::ArrayRCP >{
> public:
> Exporter( SEXP x) : RangeExporter< Teuchos::ArrayRCP >(x){}
> }
>
> }
> }
>
>
> Romain
>
> Le 23 mai 2014 à 00:42, Chaomei Lo a écrit :
>
> Sorry to confuse you, Dirk, I had my previous message ti
Sorry to confuse you, Dirk, I had my previous message title wrong. Here
below was the message with the correct title and content.
I have created R packages using Makevars and it works pretty good for me.
I am able to convert from a Rcpp::NumericVector to std::vect
Hi, Dirk,
I have created R packages using Makevars and it works pretty good for me.
I am able to convert from a Rcpp::NumericVector to std::vector as in below.
*NumericVector col_cts = buildMatrix(Xr);vector
col_counts = Rcpp::as>(col_cts); *
Now I am having a problem with an application invo
Hi, Dirk,
I am testing the TRNG (Random number generation) using Rcpp, but it seems
like the PKG_CPPFLAGS and PKG_LIBS not being picked for compilation and
creating shared library. I invoked the R shell right above the “trng”.
> getwd()
[1] "/people/mei/trng-4.15"
> library(Rcpp)
> Sys.se
16 matches
Mail list logo