Skip to content
Prev 4098 / 398506 Next

generating a sequence

"Jens Oehlschl?gel-Akiyoshi" <jens.oehlschlaegel-akiyoshi at mdfactory.de> writes:
....
Hmm. vecseq is certainly impressively fast, but I tend to find any
routine that involves parsing suspicious.

sequence<-function(nvec)unlist(lapply(nvec,function(x)1:x))

clocks in at 0.09 (if you gc() first) and would seem to be equivalent
to the current one. Still two times slower than vecseq, though...