Last active
May 28, 2017 03:59
-
-
Save mdsumner/7cb21ce030ca5e9acae7d14e0d929162 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(raster) | |
r <- raster(matrix(rnorm(5e7), 5e3)) | |
pryr::object_size(r) | |
print(r) | |
## decide if the above is easily dealt with in memory by your system | |
## and compare the result without setting this option (it creates a temp file for the crop) | |
## sure to set with rater's interface, not like: #options(rasterMaxMemory = 1e9) | |
rasterOptions(maxmemory = 1e9) | |
crop(r, extent(0, .5, 0, 0.5)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment