Gets the parameter names.

# S3 method for class 'term_rcrd'
pars(x, scalar = NULL, ...)

Arguments

x

An object.

scalar

A flag specifying whether to by default return all parameters (NULL), or only scalar parameters (TRUE) or only non-scalar parameters (FALSE).

...

Other arguments passed to methods.

Value

A character vector of the names of the parameters.

See also

Examples

term <- term(
  "alpha[1]", "alpha[2]", "beta[1,1]", "beta[2,1]",
  "beta[1,2]", "beta[2,2]", "sigma", NA
)
pars(term)
#> [1] "alpha" "beta"  "sigma" NA     
pars(term, scalar = TRUE)
#> [1] "sigma" NA     
pars(term, scalar = FALSE)
#> [1] "alpha" "beta"  NA