On Fri, Mar 16, 2007 at 04:59:28PM +0000, Gavin Simpson wrote:
> 
> When you create your result vector, is is of length 0. Each time you add
> a result, R has to copy the current result object, enlarge it and so on.
> This all takes a lot of time. Better to allocate storage first, then add
> each result in turn be replacement. E.g.:
> 

Thanks! Your explanations will be quite helpful in cleaning up my code.

-- 
Regards,

Tyler Smith

______________________________________________
[email protected] 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