The R Project SVN R

Rev

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

Rev 62069 Rev 62311
Line 37... Line 37...
37
    return to the \R default.  See \sQuote{Details} for the
37
    return to the \R default.  See \sQuote{Details} for the
38
    interpretation of \code{NULL}.}
38
    interpretation of \code{NULL}.}
39
  \item{normal.kind}{character string or \code{NULL}.  If it is a character
39
  \item{normal.kind}{character string or \code{NULL}.  If it is a character
40
    string, set the method of Normal generation.  Use \code{"default"}
40
    string, set the method of Normal generation.  Use \code{"default"}
41
    to return to the \R default.  \code{NULL} makes no change.}
41
    to return to the \R default.  \code{NULL} makes no change.}
42
  \item{seed}{a single value, interpreted as an integer.}
42
  \item{seed}{a single value, interpreted as an integer, or \code{NULL}
-
 
43
    (see \sQuote{Details}).}
43
  \item{vstr}{a character string containing a version number,
44
  \item{vstr}{a character string containing a version number,
44
    e.g., \code{"1.6.2"}}
45
    e.g., \code{"1.6.2"}}
45
  \item{rng.kind}{integer code in \code{0:k} for the above \code{kind}.}
46
  \item{rng.kind}{integer code in \code{0:k} for the above \code{kind}.}
46
  \item{n1, n2, \dots}{integers.  See the details for how many are required
47
  \item{n1, n2, \dots}{integers.  See the details for how many are required
47
    (which depends on \code{rng.kind}).}
48
    (which depends on \code{rng.kind}).}
Line 145... Line 146...
145
  results.  The \code{"Box-Muller"} generator is stateful as pairs of
146
  results.  The \code{"Box-Muller"} generator is stateful as pairs of
146
  normals are generated and returned sequentially.  The state is reset
147
  normals are generated and returned sequentially.  The state is reset
147
  whenever it is selected (even if it is the current normal generator)
148
  whenever it is selected (even if it is the current normal generator)
148
  and when \code{kind} is changed.
149
  and when \code{kind} is changed.
149
 
150
 
150
  \code{set.seed} uses its single integer argument to set as many seeds
151
  \code{set.seed} uses a single integer argument to set as many seeds
151
  as are required.  It is intended as a simple way to get quite different
152
  as are required.  It is intended as a simple way to get quite different
152
  seeds by specifying small integer arguments, and also as a way to get
153
  seeds by specifying small integer arguments, and also as a way to get
153
  valid seed sets for the more complicated methods (especially
154
  valid seed sets for the more complicated methods (especially
154
  \code{"Mersenne-Twister"} and \code{"Knuth-TAOCP"}).  There is no
155
  \code{"Mersenne-Twister"} and \code{"Knuth-TAOCP"}).  There is no
155
  guarantee that different values of \code{seed} will seed the RNG
156
  guarantee that different values of \code{seed} will seed the RNG
156
  differently, although any exceptions would be extremely rare.
157
  differently, although any exceptions would be extremely rare.  If
-
 
158
  called with \code{seed = NULL} it re-initializes (see \sQuote{Note})
-
 
159
  as if no seed had yet been set.
157
 
160
 
158
  The use of \code{kind = NULL} or \code{normal.kind = NULL} in
161
  The use of \code{kind = NULL} or \code{normal.kind = NULL} in
159
  \code{RNGkind} or \code{set.seed} selects the currently-used
162
  \code{RNGkind} or \code{set.seed} selects the currently-used
160
  generator (including that used in the previous session if the
163
  generator (including that used in the previous session if the
161
  workspace has been restored): if no generator has been used it selects
164
  workspace has been restored): if no generator has been used it selects