[Rcpp-devel] multidimensional arrays
Frederico Mestre
mestre.frederico at gmail.com
Fri Jun 15 11:27:12 CEST 2012
Hello all:
I'm a regular user of R, but my knowledge of C++ is limited.
I need to create functions to generate random landscapes (with two habitat
classes) based on area and distance amongst patches. This would take quite a
long time in R so I thought it would be better to use Rcpp (which seems a
simpler way to integrate R and C++). I need to generate these landscapes for
the current time and their evolution in the future (about 1000 to each of
these time steps).
I thought it would be better to generate these "landscapes" as
multidimensional arrays but I'm finding it hard to work with C++.
Would it be adequate to use this functions:
rdlandscape <- cxxfunction(signature(x = "numeric"), body = "C++ code",
plugin="Rcpp")
I don't need to retain these objects after the run just calculate several
parameters (as extinction probability) of a species that would be present in
these landscapes.
Any ideas?
Best,
Frederico Mestre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20120615/8cb9d633/attachment-0001.html>
More information about the Rcpp-devel
mailing list