get_vars.Rd
Extract the variables declared in a stan model
get_vars(x, block)
a stanedit
object
character (optional), the block or blocks in which to search; by default the whole model will be searched
a character vector of variable names
model_file_name <- system.file(package = "stanedit", "regression.stan")
reg <- stanedit(filename = model_file_name)
get_vars(reg, "parameters")
#> [1] "alpha" "beta" "sigma"