confusedallthetime
confusedallthetime

Reputation: 155

Error: C stack usage 7970272 is too close to the limit

I'm trying to import a RDS file in Rstudio. And, when I type glimpse(data), it shows "Error: C stack usage 7970272 is too close to the limit'. I don't know if the following information is helpful, but the data is a spacial data, and has 26452 features and 14 fields.

I use a Macbook, and I tried following the answer from this thread

I typed the code in my terminal, but it still didn't work. Please help!

> Cstack_info()
      size    current  direction eval_depth 
   7969177      17024          1          2 

enter image description here

Edit 1: output for str(data)

Classes ‘sf’ and 'data.frame':  26452 obs. of  15 variables:
 $ State         : chr  "AL" "AL" "AL" "AL" ...
 $ Location      : chr  "Huntsville, AL" "Huntsville, AL" "Montgomery, AL" "Huntsville, AL" ...
 $ City          : chr  "HUNTSVILLE" "HUNTSVILLE" "MONTGOMERY" "HUNTSVILLE" ...
 $ Date          : Date, format: "2020-06-01" ...
 $ Attendees     : int  NA NA 40 NA 500 25 NA 40 NA 10 ...
 $ Tags          : Factor w/ 1893 levels "Civil Rights; Against abortion rights",..: 237 237 237 237 237 1292 237 843 1111 173 ...
 $ Curated       : Factor w/ 2 levels "No","Yes": 2 2 2 2 2 2 2 2 2 2 ...
 $ Source        : Factor w/ 22639 levels "B","http://13wham.com/news/local/community-rallies-behind-victims-survivors-of-gun-violence",..: 14745 12397 17787 14745 18848 12831 12390 12833 9287 2367 ...
 $ Total.Articles: int  2 3 5 1 3 1 1 8 1 2 ...
 $ Year          : num  2020 2020 2019 2020 2020 ...
 $ Day           : int  1 30 6 5 31 7 9 9 30 5 ...
 $ Month         : num  6 5 2 6 5 9 12 11 6 5 ...
 $ DOY           : num  153 151 37 157 152 250 343 313 181 125 ...
 $ Name          : Factor w/ 51 levels "Alabama","Alaska",..: 1 1 1 1 1 1 1 1 1 1 ...
 $ geometry      :sfc_POINT of length 26452; first list element:  'XY' num  -86.6 34.7
 - attr(*, "sf_column")= chr "geometry"
 - attr(*, "agr")= Factor w/ 3 levels "constant","aggregate",..: NA NA NA NA NA NA NA NA NA NA ...
  ..- attr(*, "names")= chr  "State" "Location" "City" "Date" ...

Upvotes: 1

Views: 7979

Answers (1)

confusedallthetime
confusedallthetime

Reputation: 155

Thank you everyone for the comment! I fixed it by clearing my computer memory and re-downloading the newest version of R and Rstudio.

Upvotes: 1

Related Questions