【描述】
Generate regular sequences. 产生规则的序列
【用法】
seq(...)
## Default S3 method:
seq(from = 1, to = 1, by = ((to - from)/(length.out - 1)),
length.out = NULL, along.with = NULL, ...)
seq.int(from, to, by, length.out, along.with, ...)
seq_along(along.with)
seq_len(length.out)
【参数】
...
arguments passed to or from methods.
from, to
the starting and (maximal) end values of the sequence. Of length 1 unless just from is supplied as an unnamed argument.
by
number: increment of the sequence.
length.out
desired length of the sequence. A non-negative number, which for seq and seq.int will be rounded up if fractional.
along.with
take the length from the length of this argument.
【代码】
> seq(from=1, to=10) #from和to可以省略
[1] 1 2 3 4 5 6