FAQ

Frequently asked questions

Where can I get more help on the basics of R?

There are a number of different intros to R out there. Norm Matloff’s intro is a particularly good one. Swirl is another good resource. The only way to really learn R, as any other programming language, is to use it!

How do I load a shapefile into R?

There are several ways to read in shapefiles into R. Our favourite is the readOGR function in the rgdal package. At minimum you need to specify the folder where the shapefile lives and the name of the shapefile without the .shp file extension.

library(rgdal)
shape_object <- readOGR(dsn = "path to folder with shapefile", layer = "name of shapefile without .shp")