Hi Adrian, On 26 November 2013 at 18:57, Adrian Duşa wrote: | Thanks for your reply, at some point I did consider the possibility of | using Rcpp, but at that time I had already wrote a considerable amount | of regular C code. | | Now I am only trying to extend that code a little, translating | everything in Rcpp would probably consume more time (although I agree | it might be easier to use).
Well there is no need to translate a single line. C++ works happily with your C code. But instead of creating the list in C (which you had difficulty with) you would create it in C++. | I read the "Writing R Extensions" manual, I could only find how to | handle with R lists in C (section 5.9.6 Handling lists), but I could | not find how to <create> a list in C, and access its components, and | this is basically where I got stuck. Gabor gave you a good pointer. Grep'ing through existing packages is often a good idea. If you can stomach reading other people's code ;-) Dirk -- Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel