From khansen at stat.berkeley.edu  Thu Jul  9 07:15:30 2009
From: khansen at stat.berkeley.edu (Kasper Daniel Hansen)
Date: Wed, 8 Jul 2009 22:15:30 -0700
Subject: [Rd] bug in seq_along
Message-ID: <7E0D03FE-2742-4442-977F-538AE7DE920A@stat.berkeley.edu>

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



[Rd] bug in seq_along
Kasper Daniel Hansen