>>>>> "Duncan" == Duncan Murdoch <[EMAIL PROTECTED]> >>>>> on Fri, 10 Dec 2004 08:38:34 -0500 writes:
Duncan> On Fri, 10 Dec 2004 09:32:14 +0100, Martin Maechler Duncan> <[EMAIL PROTECTED]> wrote : RichOK> If you want to pass seq(length=n) to a .C or RichOK> .Fortran call, it's not helpful that you can't tell RichOK> what the type is until you know n! It would be nice RichOK> if seq(length=n) always returned the same type. I RichOK> use seq(length=n) often instead of 1:n because I'd RichOK> like my code to work when n == 0; it would make life RichOK> simpler if seq(length=n) and 1:n were the same type. >> >> now if that really makes your *life* simpler, what does that >> tell us about your life ;-) :-) >> >> But yes, you are right. All should return integer I think. Duncan> Yes, it should be consistent, and integer makes sense here. the R-devel version now does; and so does seq(along = <.>) Also ?seq {or ?seq.default} now has the value section as > Value: > The result is of 'mode' '"integer"' if 'from' is (numerically > equal to an) integer and, e.g., only 'to' is specified, or also if > only 'length' or only 'along.with' is specified. which is correct {and I hope does not imply that it gives *all* cases of an integer result}. Martin ______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel