extract_variable {posterior} | R Documentation |
Extract a vector of draws of a single variable.
extract_variable(x, variable, ...) ## Default S3 method: extract_variable(x, variable, ...) ## S3 method for class 'draws' extract_variable(x, variable, ...) ## S3 method for class 'draws_rvars' extract_variable(x, variable, ...)
x |
(draws) A |
variable |
(string) The name of the variable to extract. |
... |
Arguments passed to individual methods (if applicable). |
A numeric vector of length equal to the number of draws.
x <- example_draws() mu <- extract_variable(x, variable = "mu") str(mu)