From romain at r-enthusiasts.com  Tue May 14 15:37:56 2013
From: romain at r-enthusiasts.com (Romain Francois)
Date: Tue, 14 May 2013 15:37:56 +0200
Subject: [Rd] =?utf-8?q?invalid_operands_of_types_=E2=80=98SEXPREC*?=
 =?utf-8?b?4oCZIGFuZCDigJhSX2xlbl904oCZIHRvIGJpbmFyeSDigJhvcGVyYXRvci8=?=
 =?utf-8?b?4oCZIHdpdGggUmNwcC4=?=
In-Reply-To: <CAGBzz=Jg5KSKE=0g_i8EyhfjR_k_6ivPpyAmFHhKyVHuQbOLVQ@mail.gmail.com>
References: <CAGBzz=Jg5KSKE=0g_i8EyhfjR_k_6ivPpyAmFHhKyVHuQbOLVQ@mail.gmail.com>
Message-ID: <EFD4F968-7262-4D5F-8D32-EDA60D6F16C2@r-enthusiasts.com>

Please use the appropriate mailing list (Rcpp-devel) for Rcpp questions. 

Romain

Le 14 mai 2013 ? 06:42, Xiao He <praguewatermelon at gmail.com> a ?crit :

> Dear R-Developers,
> 
> I just started learning how to use Rcpp. Earlier while using it, I
> encountered an error as shown below:
> 
> file74d8254b96d4.cpp: In function ?Rcpp::NumericVector
> foo(Rcpp::NumericVector, Rcpp::NumericVector, Rcpp::NumericVector,
> Rcpp::Function, Rcpp::Function)?:
> file74d8254b96d4.cpp:10: error: invalid operands of types ?SEXPREC*? and
> ?R_len_t? to binary ?operator/?
> make: *** [file74d8254b96d4.o] Error 1
> 
> Below is a mock function that can reproduce this error. I wonder if anyone
> can tell me what is the problem here. Thank you in advance!!
> 
> foo<-cppFunction('
>   NumericVector foo(NumericVector q, NumericVector shape1, NumericVector
> shape2, Function pbeta, Function sequence){
>         NumericVector output(q.size());
>         output=pbeta(sequence(q.size())/q.size(), shape1, shape2);
>        return output;
> }
> ')
> 
> 
> Best,
> Xiao
> 
>    [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] =?utf-8?q?invalid_operands_of_types_=E2=80=98SEXPREC*?= =?utf-8?b?4oCZIGFuZCDigJhSX2xlbl904oCZIHRvIGJpbmFyeSDigJhvcGVyYXRvci8=?= =?utf-8?b?4oCZIHdpdGggUmNwcC4=?=
Romain Francois