I am trying to load huge number of points (shapefile) in R. But when I load it, the program displays following error message and just stops.

"R for Windows GUI front-end has stopped working"

My OS is Windows 7 for 32 bit and R version is 3.1.0. I have tried on 2 different desktops with same OS and R version but both of them have same problems.

I have used below script.

##### Loading required packages # Also install packages

##### Loading shape file    # All geographical files should be same extension
forest  <- readShapePoints("F:\\NDVI_MODIS_500\\Mod_ndvi_500_shapes\\mod_ndvi_500_grid_point_03_forest_steppe.shp")
Previous (forest) shape (point) loaded perfectly, but following shape (point) could not to load because of this error. The only one difference between those shape is the number of point. The 'steppe' contains large number of point to compare 'forest' shape file.
steppe  <- readShapePoints("F:\\NDVI_MODIS_500\\Mod_ndvi_500_shapes\\mod_ndvi_500_grid_point_04_steppe.shp")
  • Try with rgdal instead, but if you don't have the system resources it's not going to work. I.e. forest <- readOGR("F:\\NDVI_MODIS_500\\Mod_ndvi_500_shapes", "mod_ndvi_500_grid_point_03_forest_steppe"); 32-bit R is a real limitation. How many points is it? Can you read a subset first? Also, try with QGIS to do this.
    – mdsumner
    Commented Sep 15, 2014 at 2:42

2 Answers 2


A 32 bit Windows 7 Operating system can use at most 4 GB of RAM[1], combined for all activity on your machine.

If your shapefile is very large and you also have many other programs running then you'll probably exceed 4 GB.

So, to see which process uses up your memory you can open the Windows Task Manager (using ctrl-alt-delete) and then look at the "process" tab.

Keep that open while having R process your shapefile and you will be able to see how much memory R uses.

The simplest solution would be to split your shapefile into smaller parts or use a machine with more memory.

[1] http://msdn.microsoft.com/en-us/library/windows/desktop/aa366778%28v=vs.85%29.aspx


Get more system memory and use 64-bit R so it can utilize that memory.

Your question has no information about the size of the file.

  • S/he can't use 64bit R on a Windows 7 32bit. So they also need to upgrade the OS to a 64bit version.
    – til_b
    Commented Sep 15, 2014 at 8:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.