[R] converting R objects to C types in .Call
Prof Brian Ripley
ripley at stats.ox.ac.uk
Tue Jan 25 13:42:07 CET 2005
On Tue, 25 Jan 2005, Edzer J. Pebesma wrote:
> Is there a specific reason why, instead of
>
> CHAR(STRING_ELT(chstr, 0));
>
> The S-Plus compatible
>
> CHARACTER_POINTER(chstr)[0]
>
> does not work in R?
Yes.
This is really a question for R-devel, but briefly, R and S-PLUS store
character vectors in very different ways. This worked prior to 1.2.0, but
was changed as part of the price of the new (then) garbage collector.
--
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