john seers (IFR) wrote:
>  
>
>
>
> This is definitely the best way:
>
> c(lapply(1:length(x), function(i, x, y) c(x[i], y[i]), x, y),
> recursive=TRUE)
>
>
>   
you'd better test it yourself;  it simply won't do the job -- you get a
list of vectors, no?
(hint: replace the initial 'c' with 'unlist';  but it's still cumbersome
and inefficient.)

vQ

______________________________________________
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