[R-sig-Geo] DBF file size

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Thu Oct 14 15:37:58 CEST 2010


On Wed, Oct 13, 2010 at 9:20 PM, kapo coulibaly <kmcoulib at gmail.com> wrote:
> I'm doing Groundwater Modeling and that is the appropriate input format for
> the GUI I'm using (Groundwater vistas) for what I'm trying to do. Funny
> enough I was able to create a dbf with 512 columns in ArcGIS but as I said I
> needed more.
>

 write.dbf from package 'foreign' can write bigger dbfs than 512 columns.

 > d=as.data.frame(t(1:1200))
 > dim(d)
 [1]    1 1200
 > d=rbind(d,d+1)
 > d=rbind(d,d+10)
 > dim(d)
 [1]    4 1200
 > write.dbf(d,"big.dbf")

 - thats now a 1200 column x 4 row dbf file.

 Reading it back with read.dbf in R gets the data back fine, but
OpenOffice stops at 1024 columns and gives an error message about too
many *rows*!

Barry



More information about the R-sig-Geo mailing list