Hi,

I have a C function (called via .C) which returns (by writing into
buffers) some values of known (or fixed) length, all of these are
numerical so I can allocate storage for them via as.double() and
as.integer().

However, there is a potential error message that I would like to
return into a char * buffer [1].  How can I allocate it in R (eg
something similar to as.integer(), but taking the number of
characters).

I would like to avoid .Call if possible, this is the only tricky
argument.

Thanks,

Tamas

[1] I would of course use strncpy to avoid overflows.

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to