R/subset.R
subset.term.Rd
Subsets a term vector.
# S3 method for class 'term' subset(x, pars = NULL, select = NULL, ...)
The object.
A character vector of parameter names.
A character vector of the names of the parameters to include in the subsetted object.
These dots are for future extensions and must be empty.
The modified term vector.
The select argument is .
select
term-vector()
term <- term( "alpha[1]", "alpha[2]", "beta[1,1]", "beta[2,1]", "beta[1,2]", "beta[2,2]", "sigma" ) subset(term, "beta") #> <term[4]> #> [1] beta[1,1] beta[2,1] beta[1,2] beta[2,2] subset(term, c("alpha", "sigma")) #> <term[3]> #> [1] alpha[1] alpha[2] sigma