I would like to unzip a .zip file in R. After unzipping, I would like to read the file .shp
, so I did the following:
library(rgdal)
temp <- tempfile()
download.file("https://github.com/JovaniSouza/JovaniSouza5/blob/ac61a729b3856112bcb100f4dfb2c900565fdb54/gasoduto1.zip",temp)
con <- readOGR(unz(temp, "gasoduto_SIRGAS_2000.shp"))
The following error appears:
Error in readOGR(unz(temp, "gasoduto_SIRGAS_2000.shp")) :
is.character(dsn) is not TRUE