[R] allocating memory in C, not in R
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Sep 1 23:16:59 CEST 2004
On Wed, 1 Sep 2004, S. Blay wrote:
> I need to retrieve several vectors of various types from a call
> to .C(), but I don't know their length in advance.
> Is there a way to do this without allocating an excessive amount
> of memory?
> If so, an example would be very helpful.
It would be very much easier to use .Call rather than .C.
Alternatively, generate and allocate in C on one C call and retrieve on a
second, as rpart does.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list