Determine the variables in a mpoly object.

vars(p)

Arguments

p

An mpoly or mpolyList object.

Value

A character vector of the variable names.

Examples

p <- mp("x + y^2") vars(p)
#> <list_of<quosure>> #> #> [[1]] #> <quosure> #> expr: ^p #> env: 0x7fae39bfbd68 #>
p <- mp(c("x + y^2", "y - 2 x")) vars(p)
#> <list_of<quosure>> #> #> [[1]] #> <quosure> #> expr: ^p #> env: 0x7fae39bfbd68 #>