I want to read a shapefile(polyline) into R, using rgdal and raster packages.
The code looks like:
but I got a warning:
Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘shapefile’ for signature ‘"file"’
I am new in using R dealing with spatial layers.