This is a deriv method for mpoly objects. It does not call the stats::deriv().

# S3 method for mpoly
deriv(expr, var, ...)

Arguments

expr

an object of class mpoly

var

character - the partial derivative desired

...

any additional arguments

Value

An object of class mpoly or mpolyList.

Examples

m <- mp("x y + y z + z^2") deriv(m, "x")
#> y
deriv(m, "y")
#> x + z
deriv(m, "z")
#> y + 2 z
deriv(m, c("x","y","z"))
#> y #> x + z #> y + 2 z
deriv(m, "a")
#> 0
is.mpoly(deriv(m, "x"))
#> [1] TRUE
is.mpolyList( deriv(m, c("x","y","z")) )
#> [1] TRUE