Guest User

Untitled

a guest
Aug 18th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. Monitor memory usage in R
  2. smallest.sv <- function(){
  3. A <- matrix(rnorm(1e6), 1e3);
  4. mysvd <- svd(A);
  5. return(tail(mysvd$d, 1));
  6. }
  7.  
  8. system.time(x <- smallest.sv())
  9.  
  10. Rprof(tf <- "rprof.log", memory.profiling=TRUE)
  11.  
  12. [your code]
  13.  
  14. Rprof(NULL)
  15. summaryRprof(tf)
Add Comment
Please, Sign In to add comment