Re: [Rd] Timing of SET_VECTOR_ELT

2013-04-01 Thread Simon Urbanek
On Apr 1, 2013, at 2:54 PM, Terry Therneau wrote: > > > On 04/01/2013 12:44 PM, Simon Urbanek wrote: >> On Apr 1, 2013, at 1:10 PM, Terry Therneau wrote: >> >>> Assume a C program invoked by .Call, that returns a list. >>> >>> Near the top of the program we allocate space for all the list elem

Re: [Rd] Timing of SET_VECTOR_ELT

2013-04-01 Thread Terry Therneau
On 04/01/2013 12:44 PM, Simon Urbanek wrote: On Apr 1, 2013, at 1:10 PM, Terry Therneau wrote: Assume a C program invoked by .Call, that returns a list. Near the top of the program we allocate space for all the list elements. (It is my habit to use "xyz2" for the name of the R object and "x

Re: [Rd] Timing of SET_VECTOR_ELT

2013-04-01 Thread Duncan Murdoch
On 01/04/2013 1:10 PM, Terry Therneau wrote: Assume a C program invoked by .Call, that returns a list. Near the top of the program we allocate space for all the list elements. (It is my habit to use "xyz2" for the name of the R object and "xyz" for the pointer to its contents.) PROTE

Re: [Rd] Timing of SET_VECTOR_ELT

2013-04-01 Thread Simon Urbanek
On Apr 1, 2013, at 1:10 PM, Terry Therneau wrote: > Assume a C program invoked by .Call, that returns a list. > > Near the top of the program we allocate space for all the list elements. (It > is my habit to use "xyz2" for the name of the R object and "xyz" for the > pointer to its contents.)

[Rd] Timing of SET_VECTOR_ELT

2013-04-01 Thread Terry Therneau
Assume a C program invoked by .Call, that returns a list. Near the top of the program we allocate space for all the list elements. (It is my habit to use "xyz2" for the name of the R object and "xyz" for the pointer to its contents.) PROTECT(means2 = allocVector(REALSXP, nvar)); means