[Rd] C function with unknown output length

Vincent Goulet vincent.goulet at act.ulaval.ca
Wed Jun 6 19:17:25 CEST 2007

Hi all,

Could anyone point me to one or more examples in the R sources of a C  
function that is called without knowing in advance what will be the  
length (say) of the output vector?

To make myself clearer, we have a C function that computes  
probabilities until their sum gets "close enough" to 1. Hence, the  
number of probabilities is not known in advance.

I would like to have an idea what is the best way to handle this  
situation in R.

Thanks in advance!

   Vincent Goulet, Associate Professor
   École d'actuariat
   Université Laval, Québec
   Vincent.Goulet at act.ulaval.ca   http://vgoulet.act.ulaval.ca

More information about the R-devel mailing list