Displaying 1 result from an estimated 1 matches for "uparea".
2011 Aug 25
2
apply function to spatial grid data frame to calculate CTI
Dear R helpers,
I'm new to R and struggling with applying functions to a spatial grid data frame, called data for example.data has a variable named "slope" and "uparea"
Basically, I need to calculate the tan(data$slope)Next, I need to divide data$uparea by data$slope and take the log() of that all
In the basic examples I found how to make simple multiplications with a scalar likedata[["slope"]] = data[["slope"]]/2 # assigns new attribute...