Description Usage Arguments Details Value Methods (by class) Examples
Returns the maximum degree as an integer number.
1 2 3 4 5 6 7 8 9 10 11 12 13 
x 
an R objects 
By default, this function raises error for unknown type of object.
A numerical scalar can be treated as a polynomial with zero degree.
A numerical matrix has zero degree as each of its items has zero degree as well.
For polynomials this function returns the highest degree of its terms with nonzero coefficient.
The value is an integer number which can be different from zero only for polynomial objects.
numeric
: a scalar argument always has zero degree
matrix
: a numerical matrix always has zero degree
polynomial
: the degree of a polynomial
polyMatrix
: the degree of a polynomial matrix is the highest degree of its elements
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19  # numerical
degree(1) ## 0
# numerical matrix
degree(matrix(1:6, 3, 2)) ## 0
# polinomial
degree(parse.polynomial("1")) ## 0
degree(parse.polynomial("1 + x")) ## 1
degree(parse.polynomial("1 + x^3")) ## 3
# polynomial matrices
degree(parse.polyMatrix(
"x; x^2 + 1",
"0; 2x"))
## 2

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.