For numeric arguments, a numeric vector. This will be of type
integer if from is integer-valued and the result
is representable in the R integer type, otherwise of type
"double" (aka mode"numeric").For factors, an unordered factor with levels labelled as la:lb
and ordered lexicographically (that is, lb varies fastest).
Details
The binary operator : has two meanings: for factors a:b is
equivalent to interaction(a, b) (but the levels are
ordered and labelled differently).
For other arguments from:to is equivalent to seq(from, to),
and generates a sequence from from to to in steps of 1
or -1. Value to will be included if it differs from
from by an integer up to a numeric fuzz of about 1e-7.
Non-numeric arguments are coerced internally (hence without
dispatching methods) to numeric---complex values will have their
imaginary parts discarded with a warning.
References
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
The New S Language.
Wadsworth & Brooks/Cole.
(for numeric arguments: S does not have : for factors.)