[R-sig-Geo] Wrong reading of data type in readOGR ?

Patrick Giraudoux patrick.giraudoux at univ-fcomte.fr
Fri Nov 25 15:58:00 CET 2016


Dear Listers,

I meet a problem with readOGR on an ESRI shapefile which was correctly 
read in the past (practical training with students). Now all integer 
variables are read as "factors" although they should be read as integer. 
With the argument stringsAsFactors=FALSE, the reading gives 
"characters", but not the expected integers.

Reading the corresponding *.dbf file with foreign:read.dbf gives a 
correct reading. This makes me suspect that something goes wrong with 
the last version of readOGR (maybe earlier too). Those installed one 
year ago in the computer room are OK.

Any suggestion/idea?

Best,

Patrick



More information about the R-sig-Geo mailing list