The R Project SVN R

Rev

Rev 27712 | Rev 32195 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 27712 Rev 28247
Line 12... Line 12...
12
            length.out = NULL, along.with = NULL, ...)
12
            length.out = NULL, along.with = NULL, ...)
13
}
13
}
14
\usage{
14
\usage{
15
from:to
15
from:to
16
   a:b
16
   a:b
-
 
17
 
17
seq(from, to)
18
seq(from, to)
18
seq(from, to, by=)
19
seq(from, to, by=)
19
seq(from, to, length=)
20
seq(from, to, length=)
20
seq(along)
21
seq(along=)
-
 
22
seq(from)
21
}
23
}
22
\arguments{
24
\arguments{
23
  \item{from}{starting value of sequence.}
25
  \item{from}{starting value of sequence.}
24
  \item{to}{(maximal) end value of the sequence.}
26
  \item{to}{(maximal) end value of the sequence.}
25
  \item{by}{increment of the sequence.}
27
  \item{by}{increment of the sequence.}
Line 38... Line 40...
38
  arguments when programming.
40
  arguments when programming.
39
 
41
 
40
  Function \code{seq} is generic, and only the default method is
42
  Function \code{seq} is generic, and only the default method is
41
  described here.
43
  described here.
42
 
44
 
43
  The operator \code{:} and the first \code{seq(.)} form generate the
45
  The operator \code{:} and the \code{seq(from, to)} form generate the
44
  sequence \code{from, from+1}, \ldots, \code{to}.
46
  sequence \code{from, from+1, \dots, to}.
45
 
47
 
46
  The second form generates \code{from, from+by}, \ldots, \code{to}.
48
  The second form generates \code{from, from+by}, \ldots, up to the
-
 
49
  sequence value less than or equal to \code{to}.
47
 
50
 
48
  The third generates a sequence of \code{length} equally spaced values
51
  The third generates a sequence of \code{length} equally spaced values
49
  from \code{from} to \code{to}.
52
  from \code{from} to \code{to}.
50
 
53
 
-
 
54
  The fourth form generates the sequence \code{1, 2, \dots, length(along)}.
-
 
55
 
51
  The last generates the sequence \code{1, 2}, \ldots,
56
  The last generates the sequence \code{1, 2, \dots, length(from)}
-
 
57
  (as if argument \code{along} had been specified),
52
  \code{length(along)}, unless the argument is of length 1 when it is
58
  \emph{unless} the argument is numeric of length 1 when it is
53
  interpreted as a \code{length} argument.
59
  interpreted as \code{1:from} (even for \code{seq(0)} for
-
 
60
  compatibility with S).
54
 
61
 
55
  If \code{from} and \code{to} are factors of the same length, then
62
  If \code{from} and \code{to} are factors of the same length, then
56
  \code{from : to} returns the \dQuote{cross} of the two.
63
  \code{from : to} returns the \dQuote{cross} of the two.
57
 
64
 
58
  Very small sequences (with \code{from - to} of the order of \eqn{10^{-14}}
65
  Very small sequences (with \code{from - to} of the order of \eqn{10^{-14}}