I\'ve posted this question on the GIS stack exchange, but it\'s not seeing much traffic.
I\'m a GIS user who\'s been using R for stats for a few years, and I\'m excited
Iam using R for GIS suff for several years now, usually in combination with QGIS. For manipulating attribute tables I usually save my shapes as CSV with the geometry as WKT (you will find the options in the QGIS save-dialog). In the next step I read all my csv(shapes) in R and do my statistics, joining, etc. Finally I write them back to the HDD and load them back into QGIS (no import-dialog needed just drag & drop) and save them as shapefiles.
HTH, Jo
I'm not sure I totally understand what you're trying to do. It looks like you just want to add a new column to the attribute table? If this is right, then just treat it like any dataframe.
library(rgdal)
dsn <- system.file("vectors", package = "rgdal")
shp<-readOGR(dsn = dsn, layer = 'cities')
shp$NewAT<-1:nrow(shp)
This works perfectly with a shapefile I have on my system. I typically rely on rgdal to read in my shapefiles, using the readOGR() function. I'm fairly certain the shapefile() function you were calling also calls rgdal.
Edited to add reproducable dataset.