Re: [R-sig-Geo] problem with loop formula in my analysis

2008-11-19 Thread Kamran Safi
uot;), ".shp", sep=""),paste("centre_plot",i,sep=""),driver="ESRI Shapefile") } Hope this works. When I played around with it, it did Kami -----Original Message----- From: [EMAIL PROTECTED] on behalf of G. Allegri Sent: Wed 19.11.2008 22:14

Re: [R-sig-Geo] problem with loop formula in my analysis

2008-11-19 Thread G. Allegri
A correction. cp["Z"] should be get(cp)[z], to evaluate the string to a variable name... 2008/11/19 G. Allegri <[EMAIL PROTECTED]>: > Alessandro, > I suggest to read some startup tutorials before asking in ML. > Anyway you can do this: > > for(i in 1:500){ > cp <- paste(sep="","centre_plot",i) >

Re: [R-sig-Geo] problem with loop formula in my analysis

2008-11-19 Thread G. Allegri
Alessandro, I suggest to read some startup tutorials before asking in ML. Anyway you can do this: for(i in 1:500){ cp <- paste(sep="","centre_plot",i) coordinates(cp) =~X+Y proj4string(cp) <- CRS("+init=epsg:26911") writeOGR(cp["Z"], paste(sep="",cp,".shp"), cp,driver="ESRI Shapefile") } 2008/

[R-sig-Geo] problem with loop formula in my analysis

2008-11-19 Thread Alessandro
Hi All, I read a lot about loop formula but this morning I tried to applied the loop for the following formulas I know it's easy for an expertise, but sorry I am working with R in this mounts and I change completely my GIS philosophy. Thanks for help give a coordinates attribution