The R Project SVN R

Rev

Rev 88581 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 88581 Rev 88692
Line 56... Line 56...
56
  \code{\link{.Machine}$integer.max}.
56
  \code{\link{.Machine}$integer.max}.
57
 
57
 
58
  The optional \code{prob} argument can be used to give a vector of
58
  The optional \code{prob} argument can be used to give a vector of
59
  weights for obtaining the elements of the vector being sampled.  They
59
  weights for obtaining the elements of the vector being sampled.  They
60
  need not sum to one, but they should be non-negative and not all zero.
60
  need not sum to one, but they should be non-negative and not all zero.
61
  If \code{replace} is true, Walker's alias method (Ripley, 1987) is
61
  If \code{replace} is true, Walker's alias method \bibcitep{R:Ripley:1987} is
62
  used when there are more than 200 reasonably probable values: this
62
  used when there are more than 200 reasonably probable values: this
63
  gives results incompatible with those from \R < 2.2.0.
63
  gives results incompatible with those from \R < 2.2.0.
64
 
64
 
65
  If \code{replace} is false, these probabilities are applied
65
  If \code{replace} is false, these probabilities are applied
66
  sequentially, that is the probability of choosing the next item is
66
  sequentially, that is the probability of choosing the next item is
Line 84... Line 84...
84
  elements from \code{1:n}, or a double vector if
84
  elements from \code{1:n}, or a double vector if
85
  \eqn{n \ge 2^{31}}{n >= 2^31}.
85
  \eqn{n \ge 2^{31}}{n >= 2^31}.
86
}
86
}
87
 
87
 
88
\references{
88
\references{
89
  \bibshow{R:Becker+Chambers+Wilks:1988}
89
  \bibshow{R:Becker+Chambers+Wilks:1988,
90
 
-
 
91
  Ripley, B. D. (1987) \emph{Stochastic Simulation}. Wiley.
90
    R:Ripley:1987}
92
}
91
}
93
\seealso{
92
\seealso{
94
  \code{\link{RNGkind}(sample.kind = ..)} about random number generation,
93
  \code{\link{RNGkind}(sample.kind = ..)} about random number generation,
95
  notably the change of \code{sample()} results with \R version 3.6.0.
94
  notably the change of \code{sample()} results with \R version 3.6.0.
96
 
95