[R] array of variable length vectors
ligges at statistik.uni-dortmund.de
Mon Feb 2 12:48:42 CET 2004
Giampiero Salvi wrote:
> I'd like to store N vectors of different lengths, and to be able to
> access them with an index, and eventually free the memory for one
> of them without modifying the indexes to the others.
> In C this would be a vector of N pointers that point to memory cells
> independently allocated.
> For example
> int *pv;
> pv = (int *) malloc(13 * sizeof(int));
> pv = (int *) malloc(7 * sizeof(int));
> pv = (int *) malloc(110 * sizeof(int));
> What is the best data type (or class) in R to do such a thing?
More information about the R-help