Rev 286 | Rev 1368 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{seq}\title{Sequence Generation}\usage{seq(from, to)seq(from, to, by=)seq(from, to, length=)seq(along)}\alias{seq}\description{The first form above generates the sequence\code{from, from+1}, \ldots, \code{to}.The second,\code{from, from+by}, \ldots, \code{to}.The third generates a sequence of\code{length}equally spaced values from\code{from} to \code{to}.The last generates the sequence\code{1, 2}, \ldots, \code{length(along)}.If \code{from} and \code{to} are factors of the same length,the ``cross'' of the two is returned.}\seealso{\code{\link{rep}}, \code{\link{sequence}}, \code{\link{row}}, \code{\link{col}}.}\examples{1:4seq(0,1, length=11)seq(1,9, by = 2) # matchseq(1,9, by = pi)# stay belowfor (x in list(NULL, letters[1:6], list(1,pi)))cat("x=",deparse(x),"; seq(along = x):",seq(along = x),"\n")f1_ gl(2,3); f1f2_ gl(3,2); f2f1:f2 # a factor, the ``cross'' f1 x f2}\keyword{manip}