isposdef.RdTest for positive definiteness.
isposdef(A, psd = FALSE, tol = 1e-10)Whether matrix A is positive definite will be determined by
applying the Cholesky decomposition. The matrix must be symmetric.
With psd=TRUE the matrix will be tested for being semi-positive
definite. If not positive definite, still a warning will be generated.
Returns TRUE or FALSE.