[Rcpp-devel] Accessing list of list members to permute them

2015-03-30 Thread ogami musashi
Hello I'm a Rcpp newbie, so sorry if the question is trivial. I have an R object which is a list of 1000 elements. Each elements is a result from a discrete wavelet transform (from package wmtsa) with 5 elements. One of them have a 5 rows and 16 colums. The first level (1000) are in fact

Re: [Rcpp-devel] Accessing list of list members to permute them

2015-03-30 Thread Christian Gunning
On Mon, Mar 30, 2015 at 6:00 AM, rcpp-devel-requ...@lists.r-forge.r-project.org < rcpp-devel-requ...@lists.r-forge.r-project.org> wrote: > > > // [[Rcpp::export]] > > List rearrangelist(List x){ > int ni=15; > int nj=4; > int nk=999; > List output; > > for (int i= 0 ; i

Re: [Rcpp-devel] Accessing list of list members to permute them

2015-03-30 Thread Romain François
Hi, Perhaps you can use ListOf instead of List, as output[i] does not know it is a matrix, so the operator()(int, int) don’t make sense. You’d need (untested, ont sure you can nest layers of ListOf) ListOf< NumericMatrix > x ListOf< ListOf > output ; Otherwise, perhaps something like the m

[Rcpp-devel] Problem with IntegerVector::value_type in recent Rcpp

2015-03-30 Thread Kevin Thornton
Hi, I've come across an issue when compiling some code with Rcpp >= 0.11.4 (using R 3.1.3 with either gcc or clang on Linux, or clang on OS X). The code that reproduces the issue is here: https://gist.github.com/molpopgen/b3bda09590172044ff84 Specifically, the last function is where I'm runnin