[R] How to return a big treelike list from .Call Interface (protect stack overflow)
"Jens Oehlschlägel"
joehl at gmx.de
Tue Nov 18 10:59:47 CET 2003
I try to create a big treelike list structure using the RDefines/RInternal
macros. The tree carries information at each node (attribute list) and at each
leaf (vector).
My understanding is that for each node I add to the binary tree I have to
call
PROTECT(newnode = NEW_LIST(2));
and cannot UNPROTECT before I return the whole tree. Same story for node
attributes and leaf vectors. However, this way I easily reach the limit of the
proteckt stack at 10000 (BTW this error is not catched). How can I increase
the protect stack? Is there a better way to create such an R structure?
Can one do C-side recursive list assignment MyList[[c(1,2,1,2,2,1)]] <<-
NewSEXP without calling the R evaluator?
Thanks for any help
Best regards
Jens Oehlschlägel
--
GMX Weihnachts-Special: Seychellen-Traumreise zu gewinnen!
Rentier entlaufen. Finden Sie Rudolph! Als Belohnung winken tolle
Preise. http://www.gmx.net/de/cgi/specialmail/
More information about the R-help
mailing list