0
  1. First I read in the file using read.csv()
  2. Now I want to delete that file

e.g.:

df1 <- read.csv("/Users/bezaa/Desktop/R/2006.csv")
df2 <- read.csv("/Users/bezaa/Desktop/R/2007.csv")

Error: cannot allocate vector of size 62.5 Mb

df3 <- read.csv("/Users/bezaa/Desktop/R/2008.csv")

Error: cannot allocate vector of size 62.5 Mb

df2 <- read.csv("/Users/bezaa/Desktop/R/2007.csv")

Error: cannot allocate vector of size 62.5 Mb

hrbrmstr
  • 77,368
  • 11
  • 139
  • 205
  • Perhaps try running the following before you try to read in the file: `gc()` and then `memory.limit(1000000)` – user113156 Nov 13 '18 at 12:46
  • `rm(df2)` or if you want to delete everything currently in the environment use `rm(list=ls())` followed by `gc()` – NelsonGon Nov 13 '18 at 12:47
  • Possible duplicate: https://stackoverflow.com/questions/5171593/r-memory-management-cannot-allocate-vector-of-size-n-mb – MrFlick Nov 13 '18 at 13:56
  • It sounds like there is just not enough RAM on your computer to load all the files at once. How large are these files? How much RAM does your computer have? – MrFlick Nov 13 '18 at 13:56

0 Answers0