Skip to content

Instantly share code, notes, and snippets.

@nassimhaddad
Last active December 11, 2015 03:39
Show Gist options
  • Save nassimhaddad/4539629 to your computer and use it in GitHub Desktop.
Save nassimhaddad/4539629 to your computer and use it in GitHub Desktop.
Matrix size test
nrow <- 100000
ncol <- 100
big_matrix <- matrix(sample(c(0,1,2), nrow * ncol, replace = TRUE), ncol = ncol)
print(object.size(big_matrix), units = "Mb")
# 76.3 Mb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment