Re: [Rcpp-devel] A simple List example that has me stumped

2012-09-17 Thread Dirk Eddelbuettel
On 17 September 2012 at 15:44, Rodney Sparapani wrote: | On 09/17/2012 03:02 PM, Dirk Eddelbuettel wrote: | > You are once again tripping over as<>() and wrap(). You_must_ use as | > as the following working example: | | Right. Is there a rule of thumb to determine when we need as<>()? | I hav

Re: [Rcpp-devel] A simple List example that has me stumped

2012-09-17 Thread Rodney Sparapani
On 09/17/2012 03:02 PM, Dirk Eddelbuettel wrote: You are once again tripping over as<>() and wrap(). You_must_ use as as the following working example: Right. Is there a rule of thumb to determine when we need as<>()? I have other examples where it seems to work without it, but I can't seem

Re: [Rcpp-devel] A simple List example that has me stumped

2012-09-17 Thread Rodney Sparapani
On 09/17/2012 02:26 PM, Rodney Sparapani wrote: Hi Gang: For me, the following returns a 1 instead of a 2. Any ideas? mcmc <- list(names=list("M", "burnin", "thin", "save"), save=list("beta", "rho", "mu", "theta"), M=2, burnin=0, thin=1) check1 <- NULL check1 <- cxxfunction(signature(arg1="li

Re: [Rcpp-devel] A simple List example that has me stumped

2012-09-17 Thread Dirk Eddelbuettel
Rodney, With all due respect, try _minimally reproducible_ examples. There is still so much clutter in the example you posted that it is hard to see the forest for the trees... You are once again tripping over as<>() and wrap(). You _must_ use as as the following working example: R> library

[Rcpp-devel] A simple List example that has me stumped

2012-09-17 Thread Rodney Sparapani
Hi Gang: For me, the following returns a 1 instead of a 2. Any ideas? mcmc <- list(names=list("M", "burnin", "thin", "save"), save=list("beta", "rho", "mu", "theta"), M=2, burnin=0, thin=1) check1 <- NULL check1 <- cxxfunction(signature(arg1="list", arg2="list", arg3