In this discussion of seq(), can anyone explain to me _why_
seq(to=n) and seq(length=3) have different types?
In fact, it's worse than that (R2.0.1):

    > storage.mode(seq(length=0))
    [1] "integer"
    > storage.mode(seq(length=1))
    [1] "double"

If you want to pass seq(length=n) to a .C or .Fortran call,
it's not helpful that you can't tell what the type is until you know n!
It would be nice if seq(length=n) always returned the same type.
I use seq(length=n) often instead of 1:n because I'd like my code to
work when n == 0; it would make life simpler if seq(length=n) and 1:n
were the same type.

Can anyone explain to me why the arguments of seq.default are
"from", "to", "by", "length.out", "along.with"
                           ^^^^         ^^^^^
when the help page for seq documents them as
"from", "to", "by", "length", and "along"?

______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to