Using the IRanges package from Bioconductor and somewhat recent R-2.9.1.

ov = IRanges(1:3, 4:6)
length(ov) # 3
seq(along = ov) # 1 2 3 as wanted
seq_along(ov) # 1!

I had expected that the last line would yield 1:3. My guess is that somehow seq_along don't utilize that ov is an S4 class with a length method.

The last line of the *Details* section of ?seq has a typeo. Currently it is
     'seq.int', 'seq_along' and 'seq.int' are primitive: the latter two
     ignore any argument name.
I would guess it ought to be
     'seq.int', 'seq_along' and 'seq_len' are primitive: the latter two
     ignore any argument name.

Kasper

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to