set.seed(4669)
A = matrix(rnorm(16),4)
B = as.big.matrix(A %*% t(A))
C = A %*% t(A)
chol(C)
dpotrf(UPLO='U', N=4, A=B, LDA=4)
D <- B[,]
D[lower.tri(D)]<-0
D
D-chol(C)
t(D)%*%D-C
#' # The big.matrix file backings will be deleted when garbage collected.
rm(A,B,C,D)
gc()
Run the code above in your browser using DataLab