On 15/04/2012 05:22, chris90nz wrote:> Hi,
>
> I am currently stuck on the following problem: I have a matrix where each
> element is a list of numbers of differing lengths. I am wondering what
would
> be the best way to send this to my C function using .C?
Follow the documentation ....
This is not the list for discussing compiled code (see the posting
guide), nor have you told us what you tried. But in fact there is only
one way to do this, and ?.C and 'Writing R Extensions' explain it to
you.
I have no idea why you would have 'a list of numbers of differing
lengths'. First, what is the length of a number? Second, why not store
numbers in numeric vectors? An example (as required by the posting
guide) would have helped compensate for an imprecise description.
>
> Cheers,
>
> Chris
> R-help at 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.
--
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