powered by
Extract a single draw from x. If a value is supplied for i, extract the ith draw; otherwise extract a random draw.
x
i
extract_draw(x, i = NULL)
A vector, with type
double, if x has class "rvec_dbl",
"rvec_dbl"
integer, if x has class "rvec_int",
"rvec_int"
character, if x has class "rvec_chr",
"rvec_chr"
logical, if x has class "rvec_lgl".
"rvec_lgl"
An rvec.
Index for the draw to be extracted. A number between 1 and n_draw(x). If no value is supplied, a draw is chosen at random.
1
n_draw(x)
n_draw() Number of draws
n_draw()
x <- rvec(matrix(1:50, ncol = 5)) extract_draw(x, i = 1) extract_draw(x)
Run the code above in your browser using DataLab