I am attempting to read in a series of polygon shapefiles from a directory and batch merge them into a single shapefile. They all have the exact same field names. I am using this code:
all_data <- do.call(rbind, lapply(data, rgdal::readOGR)) #data is a list of files that exist in the directory, but it does not #contain all of the files in that directory.
After reading in all of my files with readOGR, r returns this error and the bind fails:
Error in match.arg(method) : 'arg' must be of length 1
any ideas about what might be causing this error?