Re: [Rd] dynamic array output by .C

2005-04-14 Thread Prof Brian Ripley
On Thu, 14 Apr 2005, Simon Urbanek wrote: On Apr 14, 2005, at 6:01 PM, Tib wrote: from the examples of Writing R Extensions, I see one still has to declare the size of arrays by NEW_NUMERIC(n) or allocVector(REALSXP,n), how can I extend arrays? AFAIR you cannot extend vectors - it's like in C, you

Re: [Rd] dynamic array output by .C

2005-04-14 Thread Prof Brian Ripley
On Thu, 14 Apr 2005, Tib wrote: from the examples of Writing R Extensions, I see one still has to declare the size of arrays by NEW_NUMERIC(n) or allocVector(REALSXP,n), how can I extend arrays? I know this question is a little specific, but it would be a lot helpful if anyone can give me a quick

Re: [Rd] dynamic array output by .C

2005-04-14 Thread Simon Urbanek
On Apr 14, 2005, at 6:01 PM, Tib wrote: from the examples of Writing R Extensions, I see one still has to declare the size of arrays by NEW_NUMERIC(n) or allocVector(REALSXP,n), how can I extend arrays? AFAIR you cannot extend vectors - it's like in C, you cannot extend allocated memory without

Re: [Rd] dynamic array output by .C

2005-04-14 Thread Tib
HI, from the examples of Writing R Extensions, I see one still has to declare the size of arrays by NEW_NUMERIC(n) or allocVector(REALSXP,n), how can I extend arrays? I know this question is a little specific, but it would be a lot helpful if anyone can give me a quick question. Thanks On 4/14

Re: [Rd] dynamic array output by .C

2005-04-14 Thread Prof Brian Ripley
On Thu, 14 Apr 2005, Tib wrote: Greetings, I am building a stochastic simulation model in a C++ shared library for R. My model will generate a random number of new observations and also delete some old observations, however, the numbers cannot be predicted before the computation engine runs. For si

[Rd] dynamic array output by .C

2005-04-14 Thread Tib
Greetings, I am building a stochastic simulation model in a C++ shared library for R. My model will generate a random number of new observations and also delete some old observations, however, the numbers cannot be predicted before the computation engine runs. For simplicity, I am trying to contro