Re: [R] Varying name of output tables from looped process of list of spdf objects

2015-07-28 Thread SisoL
Hi, Thank you for the replies. I tried Peter's suggestions and this worked: ###Read forest shape files setwd("/Users/sisolarrosa/Documents/PhD/R_work/AF/IIC/split_bf_fnp/") shps<- dir(getwd(), "*.shp") shps <- gsub('.{4}$', '', shps) for (shp in shps) assign(shp, readOGR(".",layer=shp)) ###Creat

Re: [R] Varying name of output tables from looped process of list of spdf objects

2015-07-27 Thread SisoL
Hi Jim, I've tried your suggestion but it just prints "fnp" and not the iterating names (a_1, a_10, etc). Any other suggestions? Thank you very much Siso -- View this message in context: http://r.789695.n4.nabble.com/Varying-name-of-output-tables-from-looped-process-of-list-of-spdf-objects-t

Re: [R] Varying name of output tables from looped process of list of spdf objects

2015-07-27 Thread SisoL
Hi Peter, Thank you for your reply. The method for looping seems to work, but gDistance will not recognise the input. I am puzzled because when I print(fnp), and print (a_10) they look exactly the same, but when I try to run gDistance{rgeos} with a_10 it works, but with fnp it throws an error. Ple