[Rcpp-devel] questions Rcpp
Qiang Kou
qkou at qkou.info
Thu Sep 13 17:51:00 CEST 2018
Hi, Mounia,
In Rcpp, using std::vector is preferred.
It is still possible to use pointers, however, I am afraid you need to
write your "as" and "wrap" by yourself. You can find how to develop them in
our documents.
Best,
Qiang Kou
On Thu, Sep 13, 2018 at 4:15 AM Mounia ZAOUCHE <
mounia.zaouche at agroparistech.fr> wrote:
>
> Dear all.
>
> I write C++ programs and I'm currently trying to interface them with R.
>
> I have two issues :
>
> Is it possible to interface a function which has an argument that is a
> pointer (standing for an array) ?
>
> I also wrote a function whose aim is to allocate (and fill) an array of
> values. In this purpose, this function takes as an argument the address of
> the array to be allocated and is thus typed as a pointer of pointer.
> Is it possible to handle such a type and to allocate the required memory
> inside this function interfaced in R?
>
> Thank you in advance.
>
> Mounia Zaouche.
>
> _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20180913/a6fb4b0c/attachment.html>
More information about the Rcpp-devel
mailing list