[Rd] bug in seq_along

Kasper Daniel Hansen khansen at stat.berkeley.edu
Thu Jul 9 07:15:30 CEST 2009


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



More information about the R-devel mailing list