# \donttest{
tmp <- tempfile(fileext = ".h5")
X <- hdf5_create_matrix(tmp, "data/X",
data = matrix(rnorm(500), 50, 10))
# Auto-correlation: cor(X) — 10 x 10 matrix
C <- cor(X)
dim(C)
cat("method:", attr(C, "cor.method"), "\n")
# Spearman
Cs <- cor(X, method = "spearman")
dim(Cs)
# Sample-sample correlation (rows)
Sr <- cor(X, trans_x = TRUE) # 50 x 50
dim(Sr)
X$close(); C$close(); Cs$close(); Sr$close()
unlink(tmp)
# }
Run the code above in your browser using DataLab