Re: [R-sig-Geo] help to Improve "elegant" code

2008-10-20 Thread James Nylen
Follow the technique that your code already uses (a for() loop to iterate over a series of values, and a paste() function to generate the filename). To be more specific: for(method in 1:3) { ### here, insert the code you posted ## but change: # paste("DCM_1_power", i+14, ".sgrd", sep="") ## to #

[R-sig-Geo] help to Improve "elegant" code

2008-10-20 Thread Alessandro
Hi all, I wish improve this code. I have 3 raster DCM_1, DCM_2, and DCM_3 (where: DCM= Digital Crown Model) obtained from three methodology. To apply my analysis I wish to elevate every raster to power of 1.5 to 4.0 by 0.1. Respect to write three times the below formula I wish to understatin