[R] troubles with foreign:read.dbf
Patrick Giraudoux
p@tr|ck@g|r@udoux @end|ng |rom un|v-|comte@|r
Sat Apr 20 18:57:31 CEST 2019
Dear listers,
I am using the package foreign function read.dbf and meet the following
issue:
i<-"Mailles_2011a.dbf"
dbf<-read.dbf(i)
works well BUT
if I have a vector such as
files <- c("Mailles_2011a.shp", "Mailles_2011p.shp",
"Mailles_2012a.shp", "Mailles_2012p.shp", "Mailles_2013a.shp",
"Mailles_2013p.shp", "Mailles_2014p.shp", "Mailles_2015a.shp",
"Mailles_2015p.shp", "Mailles_2016p.shp")
for(i in files) {
dbf<-read.dbf(i)
names(dbf)
}
gives the following error message:
Error in read.dbf(i) : unable to open DBF file
Same error with e.g.
dbf<-read.dbf(files[1])
Any idea about what's happening?
Patrick
[[alternative HTML version deleted]]
More information about the R-help
mailing list