I can use writeOGR to write a shape file in R, but it's only working for spatial points data frames, and not spatial lines data frame.
This is the code I'm using. The dataframe is called HDOT2015_Bridge
.
writeOGR(HDOT2015_Bridge,dsn="~/Desktop/HDOT2015/Bridges",
layer="HDOT2015_Bridge",driver="ESRI Shapefile",morphToESRI = T)
The error says
Error in writeOGR(HDOT2015_Bridge, dsn = "~/Desktop/HDOT2015/Bridges", :
Creation of output file failed