Re: [R-sig-Geo] numeric fields imported as factors by readOGR()

2008-12-06 Thread Agustin Lobo
Roland, James, Roger and Carson ogrInfo() provides info consistent with the behaviour of readOGR() and editing the dbf with OO as suggested by Roland reveals that the field is labeled as "C,80" (which I do not understand as values are areas written by fTools in QGIS, Carson, could this be a bug?)

Re: [R-sig-Geo] numeric fields imported as factors by readOGR()

2008-12-05 Thread Roger Bivand
On Fri, 5 Dec 2008, James Nylen wrote: This happens to me as well. I just create a new column in the shapefile object's data, like: shp$AreaNum = as.numeric(as.vector(shp$AREA)) If all you want to know is "why is it coded this way" then I have no idea, sorry. You could look at ogrInfo() for

Re: [R-sig-Geo] numeric fields imported as factors by readOGR()

2008-12-05 Thread James Nylen
This happens to me as well. I just create a new column in the shapefile object's data, like: shp$AreaNum = as.numeric(as.vector(shp$AREA)) If all you want to know is "why is it coded this way" then I have no idea, sorry. -James On Fri, Dec 5, 2008 at 10:29 AM, Agustin Lobo <[EMAIL PROTECTED]>

[R-sig-Geo] numeric fields imported as factors by readOGR()

2008-12-05 Thread Agustin Lobo
I often get some numeric fields (i.e, AREA in this case) imported as factors by readOGR() from shp files. WHy could it be? I've reviewed the field in the dbf file and do not see any non-numeric value. Thanks Agus -- Dr. Agustin Lobo Institut de Ciencies de la Terra "Jaume Almera" (CSIC) LLuis Sol