Re: [Rd] dynamic lists at C level

2013-11-26 Thread Adrian Duşa
Thank you both, will then start from here. I didn't know that Rcpp could be fed with the C code, that's good to know...! Best wishes, Adrian On Tue, Nov 26, 2013 at 7:28 PM, Gábor Csárdi wrote: > On Tue, Nov 26, 2013 at 12:19 PM, Dirk Eddelbuettel wrote: > [...] >> Grep'ing through existing pac

Re: [Rd] dynamic lists at C level

2013-11-26 Thread Gábor Csárdi
On Tue, Nov 26, 2013 at 12:19 PM, Dirk Eddelbuettel wrote: [...] > Grep'ing through existing packages is often a > good idea. If you can stomach reading other people's code ;-) My experience is that you can learn at least as much from other people's code as from textbooks. Unless you are god, of

Re: [Rd] dynamic lists at C level

2013-11-26 Thread Dirk Eddelbuettel
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 |

Re: [Rd] dynamic lists at C level

2013-11-26 Thread Adrian Duşa
Hi Dirk, 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

Re: [Rd] dynamic lists at C level

2013-11-26 Thread Gábor Csárdi
On Tue, Nov 26, 2013 at 11:57 AM, Adrian Duşa wrote: [...] > 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 a list in C, and access its components, and > this is basically where I got stuc

Re: [Rd] dynamic lists at C level

2013-11-26 Thread Dirk Eddelbuettel
Hi Adrian, On 26 November 2013 at 18:12, Adrian Duşa wrote: | Dear R-devel, | | I am trying to do something similar to dynamic length lists in R, but | at C level. | | In R, that would be rather trivial: | - determine the length of the list | - create the list object | - store the values for ea

[Rd] dynamic lists at C level

2013-11-26 Thread Adrian Duşa
Dear R-devel, I am trying to do something similar to dynamic length lists in R, but at C level. In R, that would be rather trivial: - determine the length of the list - create the list object - store the values for each component - access value components by using "[[" At C level, for a single c