Hi,<br><br>I am a new user of Rccp. I've been trying to understand since 2 weeks how I'll be able to convert a Splus library constructed with multiple C++ functions (and files) into a nice and free R package. <br>
<br>My question seems basic to me but I'll let you judge I get this error message:<br><br>interface.cpp: In function 'SEXPREC* CreateObjectGen(SEXPREC*, SEXPREC*, S EXPREC*, SEXPREC*)': <br>
interface.cpp:115:87: error: cannot convert 'Rcpp::Fast<Rcpp::Vector<14> >' to<br>
'int*' for argument '1' to 'int CompGen(int*, int*, int*, int*, int*, int*, int*, int*, int*)'<br><br>Do this mean I have to modify every function I am calling from inside another c++ function? Is it possible? <br>
<br>Here I have this code:<br>__________<br><br>#include"outils.h" // 'outils.cpp' is the place where the function CompGen() is<br><br>#include "interface.h"<br><br>#include <stdlib.h><br>
<br>using namespace Rcpp ;<br><br>RcppExport SEXP CreerObjetGen(SEXP SInd,SEXP SPere, SEXP SMere, SEXP SSexe)<br>{ <br> STARTTIMER;<br> <br> NumericVector xSInd(SInd), xSPere(SPere), xSMere(SMere), xSSexe(SSexe);<br>
Fast<NumericVector> fSIndividu(xSIndividu), fSPere(xSPere), fSMere(xSMere) , fSSexe(xSSexe);<br> <br> ....<br> CompGen(fSInd,fSPere,fSMere,fSSexe,fInd,fpere,fmere,fsexe,&lNIndividu); // the 2nd function I called...<br>
__________<br><br>I used to have this before I had to change them to types provided by Rccp (NumericVector):<br><br> int* plIndividu =INTEGER_POINTER(AS_INTEGER(SIndividu));<br> int* plPere =INTEGER_POINTER(AS_INTEGER(SPere));<br>
etc...<br>
<br><br>I've also read the last post on the list... is it because I can't send pointers through a function?<br><br>thanks for the help,<br><br>Héloïse<br><br><br>-- <br><font color="#888888">Héloïse Gauvin<br>PhD student, Epidemiology<br>
</font><br>