[Rcpp-devel] multidimensional arrays
mestre.frederico at gmail.com
Fri Jun 15 11:27:12 CEST 2012
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",
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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rcpp-devel