2 years ago

#72891

test-img

John Thomas

Error: cannot allocate vector of size XX mb in R

So I have the following code:

customers %>% 
  select(v1,v2,v3,v4,v5
         ID
         ) %>% 
  pivot_longer(-ID, names_to = "Variables", values_to = "count") %>% 
  filter(is.na(count) == FALSE) %>% 
  ggplot() + 
  geom_bar(aes(x = `Variables`, fill = count), position = "fill") +
  coord_flip() +
  theme_minimal()

The only options are TRUE or FALSE for each of the variables. But my 7 million rows of data are giving me space allocation issues, like the error seen above. What can I do to make this work?

r

memory-management

tidyverse

allocation

0 Answers

Your Answer

Accepted video resources