Hi,

I am trying to implement an algorithm in C which will be called via the
.Call() interface.

While reading the 'Writing R Extension' manual, I stumbled upon the
R_alloc() function for allocating storage for C objects. The manual says
it should be used to allocate storage if an C object is needed/created
while manipulating R objects within a function called via the .Call()
interface. 

Because none of the examples in the manual uses R_alloc(), I wonder when
it is needed? If I create an pointer in C or a single variable it seems
not necessary?! (Or at least it is never called in the examples.). Is it
necessary when creating an array? Or better when exactly should I use
R_alloc?

Thanks!

Best regards,
Michael

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to