[R-sig-Geo] readOGR(): stringsAsFactors

Agustin Lobo alobolistas at gmail.com
Wed May 12 11:52:55 CEST 2010


ok,
After the correct installation of the new release with:
cvs -z3 -d:pserver:rgdal.cvs.sourceforge.net:/cvsroot/rgdal co -P rgdal
R CMD INSTALL rgdal 

I can confirm that the new argument works fine:
> require(rgdal)
Loading required package: rgdal
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 1.6.3, released 2009/11/19
Path to GDAL shared files: /usr/share/gdal16
Loaded PROJ.4 runtime: Rel. 4.7.1, 23 September 2009
Path to PROJ.4 shared files: (autodetected)

> packageDescription("rgdal")
Package: rgdal
Title: Bindings for the Geospatial Data Abstraction Library
Version: 0.6-27
Date: 2010-05-11
.../...

> terNOXLC <-
> readOGR(dsn="/media/TRANSCEND/MASTER_ICTA2007_2008/miniproj_GISInP2009/MARICEL2",
> layer="terNOX0709buf2500values",stringsAsFactors=F)
OGR data source with driver: ESRI Shapefile 
Source:
"/media/TRANSCEND/MASTER_ICTA2007_2008/miniproj_GISInP2009/MARICEL2", layer:
"terNOX0709buf2500values"
with 4100 features and 12 fields
Feature type: wkbPoint with 2 dimensions

> class(terNOXLC at data[,1])
[1] "character"

> terNOXLC <-
> readOGR(dsn="/media/TRANSCEND/MASTER_ICTA2007_2008/miniproj_GISInP2009/MARICEL2",
> layer="terNOX0709buf2500values",stringsAsFactors=T)
OGR data source with driver: ESRI Shapefile 
Source:
"/media/TRANSCEND/MASTER_ICTA2007_2008/miniproj_GISInP2009/MARICEL2", layer:
"terNOX0709buf2500values"
with 4100 features and 12 fields
Feature type: wkbPoint with 2 dimensions

> class(terNOXLC at data[,1])
[1] "factor"

> terNOXLC <-
> readOGR(dsn="/media/TRANSCEND/MASTER_ICTA2007_2008/miniproj_GISInP2009/MARICEL2",
> layer="terNOX0709buf2500values")
OGR data source with driver: ESRI Shapefile 
Source:
"/media/TRANSCEND/MASTER_ICTA2007_2008/miniproj_GISInP2009/MARICEL2", layer:
"terNOX0709buf2500values"
with 4100 features and 12 fields
Feature type: wkbPoint with 2 dimensions

> class(terNOXLC at data[,1])
[1] "factor"


Many thanks! When do you think that this new improvement will make it into
CRAN?
Agus

-- 
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/readOGR-stringsAsFactors-tp5034706p5040366.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list