You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#install.packages(("geosphere","rgdal")) #Run if necessary to install packages
packages<- c("geosphere","rgdal") # list the packages that you'll need
lapply(packages, require, character.only=T) # load the packages, if they don't load you might need to install them first
#setwd(".") #Currently it runs in the same file, you may need to set it differently.
#Load line shapefiles as Spatial Lines Data Frame
roads.sldf <- readOGR(dsn = ".", layer = "MLI_roads") # you load a shapefile with the directory in dsn and the name of the file minus .shp as the layer