det calculates the determinant of a matrix. determinant is a generic function that returns separately the modulus of the determinant, optionally on the logarithm scale, and the sign of the determinant.
det(x, …)
determinant(x, logarithm = TRUE, …)
| Parameter | Description |
|---|---|
x |
numeric matrix: logical matrices are coerced to numeric. |
logarithm |
logical; if TRUE (default) return the logarithm of the modulus of the determinant. |
… |
Optional arguments. At present none are used. Previous versions of det allowed an optional method argument. This argument will be ignored but will not produce an error. |
# NOT RUN {
(x <- matrix(1:4, ncol = 2))
unlist(determinant(x))
det(x)
det(print(cbind(1, 1:3, c(2,0,1))))
# }