Skip to content

creating more vectors out of one

4 messages · Marion Wenty, Paul Hiemstra, PIKAL Petr

#
Hi,

This piece of R code does the trick:

do.call("c", sapply(c(6,1,2,4), seq, from = 1))

regards,
Paul
On 02/06/2012 11:15 AM, Marion Wenty wrote:

  
    
#
Hi
This came to my mind as first, but I believe there are other options.

split(apkz, cumsum(apkz==1))

Regards
Petr
http://www.R-project.org/posting-guide.html
1 day later