Phil
Phil

Reputation: 85

Increase memory limit / can not allocate vector of size 69.2GB

I'm currently working on my bachelorthesis and I'm working with RStudio for the first time. I have a small dataset that I'm working with, it's only 20MB. However, when I try to plot it I get the error "can not allocate vector of size 69.2GB" which does not make any sense to me, as my data is not even that big.

I'm on Windows 64-bit and have 16GB RAM which is why I'm also using the 64-bit RStudio version.

I have tried the following things: I typed memory.size() and got 94.6 as a result. I typed memory.limit() and it says: 16314. If I type memory.limit(size = 16000) it says cannot reduce upper memory limit, typing size = 2500 or any other number produces the same error.

Since increasing memory limit in RStudio didn't work I also tried increasing it manually: I rightclicked on RStudio on my Desktop and put --max-mem-size=16000M in the target field, which didn't change anything either.

Here is my code:

Mois1 <- read.delim("D:/Daten/SoilMoisture/ALL_SM51_SE1_hourly.txt")
Temp1 <- read.delim("D:/Daten/SoilTemperature/ALL_ST51_SE1_hourly.txt")

Mois1 <- rename(Mois1, Date = Date_______Time.UTC. , SWC = SWC.Vol..)
Temp1 <- rename(Temp1, Date = X..Date_______Time.UTC. , Temperature = T..Â.C.)

Mois2019 <- Mois1[1:8756,]
Temp2019 <- Temp1[1:8760,]

plot(Mois2019)

The error occurs after the plot(Mois2019)

I uploaded two sections of the two data files that I'm working with here: https://gofile.io/?c=5crw62 Both documents originally have over 86000 rows each. The two objects Mois2019 and Temp2019 have 8756 and 8760, as you can see in the code.

How can I increase my memory limit?

Upvotes: 4

Views: 631

Answers (1)

mhovd
mhovd

Reputation: 4067

You are attempting to plot a very large vector (>8500) in three dimensions (Date, Time, SWC) against each other when you are using plot() without any other syntax.

Try to use plot(Mois2019$Date, Mois2019$SWC), and only ask to plot what you want/need.

Upvotes: 3

Related Questions