Hi Erin,

I don't know if you fix your problem yet but I had the same error yesterday
and the problem is that ArcGIS do not accept the caracter "." in a field
name..

hope this helps

Sam

On Thu, Mar 1, 2012 at 9:38 PM, Hodgess, Erin <HodgessE@uhd.edu> wrote:

> Hi R Sig Geo People:
>
> I'm having some trouble with the files produced by writeOGR.
>
> Here is what I'm doing in R:
>
> > str(ann11)
> Formal class 'SpatialPointsDataFrame' [package "sp"] with 5 slots
>  ..@ data       :'data.frame': 192 obs. of  10 variables:
>  .. ..$ Date          : Factor w/ 884 levels "1/1/2001","1/1/2002",..: 123
> 57 31 7 55 48 64 134 15 17 ...
>  .. ..$ Hour          : int [1:192] 17 15 11 6 3 16 21 19 1 16 ...
>  .. ..$ Offense.Type  : Factor w/ 7 levels "Aggravated Assault",..: 4 4 4
> 4 4 4 4 4 4 4 ...
>  .. ..$ Beat          : Factor w/ 121 levels "10H10","10H20",..: 28 98 111
> 51 98 34 40 45 101 51 ...
>  .. ..$ Premise       : Factor w/ 127 levels "---","01A","01B",..: 87 61
> 79 79 8 31 61 55 55 79 ...
>  .. ..$ Block.Range   : Factor w/ 254 levels "0-99","100-199",..: 156 162
> 201 198 186 44 194 122 34 32 ...
>  .. ..$ Street.Name   : Factor w/ 7537 levels "10TH","11TH",..: 687 2273
> 1549 598 1658 75 331 2505 1663 376 ...
>  .. ..$ Type          : Factor w/ 18 levels "-","AVE","BLVD",..: 6 14 6 6
> 14 14 3 3 6 4 ...
>  .. ..$ Suffix        : Factor w/ 5 levels "-","E","N","S",..: 1 5 1 1 1 1
> 4 1 1 1 ...
>  .. ..$ X..Of.Offenses: num [1:192] 1 1 1 1 1 1 1 1 1 1 ...
>  ..@ coords.nrs : num(0)
>  ..@ coords     : num [1:192, 1:2] -95.3 -95.3 -95.3 -95.6 -95.5 ...
>  .. ..- attr(*, "dimnames")=List of 2
>  .. .. ..$ : NULL
>  .. .. ..$ : chr [1:2] "lng" "lat"
>  ..@ bbox       : num [1:2, 1:2] -95.7 29.6 -95.1 30.1
>  .. ..- attr(*, "dimnames")=List of 2
>  .. .. ..$ : chr [1:2] "lng" "lat"
>  .. .. ..$ : chr [1:2] "min" "max"
>  ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slots
>  .. .. ..@ projargs: chr " +proj=longlat +ellps=WGS84 +datum=WGS84
> +towgs84=0,0,0"
> > writeOGR(ann11,dsn="ann11c",driver="ESRI Shapefile", layer="ann11c")
> Warning message:
> In writeOGR(ann11, dsn = "ann11c", driver = "ESRI Shapefile", layer =
> "ann11c") :
>  Field names abbreviated for ESRI Shapefile driver
> >
>
> and the files exist in the file folder ann11c:
>  Directory of c:\R64\R-2.14.0\bin\x64\ann11c
>
> 03/01/2012  08:36 PM    <DIR>          .
> 03/01/2012  08:36 PM    <DIR>          ..
> 03/01/2012  08:36 PM           129,953 ann11c.dbf
> 03/01/2012  08:36 PM               143 ann11c.prj
> 03/01/2012  08:36 PM             5,476 ann11c.shp
> 03/01/2012  08:36 PM             1,636 ann11c.shx
>               4 File(s)        137,208 bytes
>               2 Dir(s)  159,632,551,936 bytes free
>
> c:\R64\R-2.14.0\bin\x64>
>
> But when I go into ArcGIS 10, it has an empty attribute table and says
> that the columns do not exist.
>
> What am I doing wrong, please?
>
> thanks,
> Erin
>
>
>
> Erin M. Hodgess, PhD
> Associate Professor
> Department of Computer and Mathematical Sciences
> University of Houston - Downtown
> mailto: hodgesse@uhd.edu
>
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

	[[alternative HTML version deleted]]

