Increasing or Decreasing Memory Limit Available in R (Example Code)
In this tutorial you’ll learn how to increase or decrease the memory limit in R programming.
Example: Applying memory.limit() Function to Increase Memory Limit
runif(4444444444) # Applying runif function to large number # Error: cannot allocate vector of size 33.1 GB |
runif(4444444444) # Applying runif function to large number # Error: cannot allocate vector of size 33.1 GB
memory.limit() # Checking current memory limit # [1] 16267 |
memory.limit() # Checking current memory limit # [1] 16267
memory.limit(size = 35000) # Increasing memory limit # [1] 35000 |
memory.limit(size = 35000) # Increasing memory limit # [1] 35000
runif(4444444444) # Applying runif function again - works |
runif(4444444444) # Applying runif function again - works