Wont display my Maps

I have been trying to plot my map. however each time i execute i keep getting this error. not entirely sure how i can resolve this. keeps stating that it cannot print out the file due to its size. some 240.0 mb and other 120.0mb to be exact.

would any of y'all reckon how to do this?

thank you.
#attached code

ggplot() +

  • geom_polygon(data = merged_mikoa_mydata,
  •            aes(x = long, y = lat, group = group, 
    
  •                fill = prevalence), 
    
  •            color = "black", size = 0.25) + 
    
  • coord_map()
    Error: cannot allocate vector of size 240.0 Mb

it means that you do not have 240 (or 120) mb of free contigious space in memory.
you can remove other objects in memory by setting them to null

somethingbigyoudontneed <- NULL

R works entirely in memory so try to be as prudent with memory as you can.

oh you can also prompt the garbagecollector by calling gc()

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.