Extract a single draw from x.
If a value is supplied for i,
extract the ith draw; otherwise
extract a random draw.
Arguments
- x
An rvec.
- i
Index for the draw to be extracted. A number between
1andn_draw(x). If no value is supplied, a draw is chosen at random.
Value
A vector, with type
double, if
xhas class"rvec_dbl",integer, if
xhas class"rvec_int",character, if
xhas class"rvec_chr",logical, if
xhas class"rvec_lgl".
See also
n_draw() Number of draws