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

Roger Bivand Roger.Bivand at nhh.no
Wed May 12 18:32:37 CEST 2010


On Wed, 12 May 2010, Agustin Lobo wrote:

>
> 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?

Submitted to CRAN, should appear as source fairly soon, as binaries a 
little later.

Roger

> Agus
>
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the R-sig-Geo mailing list