Skip to content
Prev 17015 / 63424 Next

sequence()

R-help is not the list for R development questions: you didn't want help 
did you? --> moved to R-devel.

I do wonder why
[1]  1  0  1  0 -1

is considered useful.

Given that the definition seems flawed and I could not find any uses of 
this function in any package my reaction was to suggest the function be 
deprecated on the way to removal.  (I also do not understand why anyone 
would expect sequence() to do that and not one of the many things which 
seq() does.)

We certainly do not want to replace a function that works as described at 
a reasonable speed by one that does not work as described, however fast.

 	`Accuracy first, speed second'.
On Fri, 22 Jul 2005, Robin Hankin wrote:

            
I don't think you want sapply here, but lapply.  Try
[,1] [,2]
[1,]    1    1
[2,]    2    2

sic!
and much less for more realistic shorter arguments.
The fact that it sometimes gives the wrong answer, for one.