R Under development (unstable) (2024-01-14 r85805 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > > # gen_preproc <- function(n, m) { > # X <- matrix(rnorm(m*n), n,m) > # p <- center() > # proc <- prep(p) > # print(pryr::object_size(proc)) > # X0 <- init_transform(proc, X) > # print(pryr::object_size(proc)) > # rm(X) > # rm(X0) > # proc > # } > # > # library(pryr) > # > # p1 <- gen_preproc(100,1000) > # p2 <- gen_preproc(10,1000) > # p3 <- gen_preproc(1,1000) > # > # pryr::object_size(p1[[2]]) > # pryr::object_size(p2[[2]]) > # pryr::object_size(p3[[2]]) > # > # > # X <- matrix(rnorm(100*1000), 100,1000) > # pcres1 <- pca(X, ncomp=50) > # > # X <- matrix(rnorm(10*1000), 10,1000) > # pcres1 <- pca(X, ncomp=50) > > proc.time() user system elapsed 0.09 0.10 0.14