## Only upper triangular part matters (when uplo == "U" as per default)
(sy2 <- new("dsyMatrix", Dim = as.integer(c(2,2)), x = c(14, NA,32,77)))
(c2 <- chol(sy2))
str(c2)
## An example where chol() can't work
(sy3 <- new("dsyMatrix", Dim = as.integer(c(2,2)), x = c(14, -1, 2, -7)))
## gives an error in R <= 2.0.0 :
validObject(as(sy3, "dpoMatrix"), test=TRUE) # >> is not pos.def.
try(chol(sy3)) ## Error: not pos.def
Run the code above in your browser using DataLab