Hi all,

 

I need a suggestion to write this code in R more elegant . I have a  DSM
grid and I need to create a different grid raisin to different power.

 

 

Thanx Ale

 

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power15.sgrd", formula = ~^1.5)

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power16.sgrd", formula = ~^1.6)

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power17.sgrd", formula = ~^1.7)

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power18.sgrd", formula = ~^1.8)

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power19.sgrd", formula = ~^1.9)

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power15.sgrd", formula = ~^2.0)

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power20.sgrd", formula = ~^2.1)

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power15.sgrd", formula = ~^2.2)

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power15.sgrd", formula = ~^2.3)

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power15.sgrd", formula = ~^2.4)

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power15.sgrd", formula = ~^2.5)

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power15.sgrd", formula = ~^1.6)

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power15.sgrd", formula = ~^2.7)

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power15.sgrd", formula = ~^2.8)

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power15.sgrd", formula = ~^2.9)

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power15.sgrd", formula = ~^3.0)

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power15.sgrd", formula = ~^3.1)

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power15.sgrd", formula = ~^3.2)

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power15.sgrd", formula = ~^3.3)

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power15.sgrd", formula = ~^3.4)

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power15.sgrd", formula = ~^3.5)

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power15.sgrd", formula = ~^3.6)

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power15.sgrd", formula = ~^3.7)

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power15.sgrd", formula = ~^3.8)

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power15.sgrd", formula = ~^3.9)

rsaga.grid.calculus(in.grids = c("DSM_1.sgrd"),out.grid =
"DCM_1_power15.sgrd", formula = ~^4.0)


	[[alternative HTML version deleted]]


