# NOT RUN {
## Small example to prove similarity
## to standard 'cor'. We create a matrix
## by subsetting the complete 'ff' matrix.
MAT <- matrix(rnorm(70000), ncol = 700)
COR <- bigcor(MAT, size= 2000, fun = "cor")
COR <- COR[1:nrow(COR), 1:ncol(COR)]
all.equal(COR, cor(MAT)) # => TRUE
# }
# NOT RUN {
## Create large matrix.
MAT <- matrix(rnorm(137500), ncol = 13750)
COR <- bigcor(MAT, size= 2000, fun = "cor")
## Extract submatrix.
SUB <- COR[1:3000, 1:3000]
# }
Run the code above in your browser using DataLab