>> recycle(x, y, z);
>>
>> Hadley
>
>
> In a way, we can already use sugar rep_len.
>
> rep_len( x, 30 )
>
> will recycle x into a vector of length 30, lazily.

Agreed, but a helper function would automate this process:

int length = max(x.length(), y.length(), z.length())
# check integer multiples
x = rep_len(x, length)
y = rep_len(y, length)
z = rep_len(z, length)

etc.

Hadley


-- 
RStudio / Rice University
http://had.co.nz/
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to