db.compare {RGeostats} | R Documentation |
Calculate pointwise statistics between several variables in a Db
db.compare(db, fun = "mean", names = db.getname(db,"z",1))
db |
The |
fun |
The code giving the operation that must be performed between the different variables at the same point:
|
names |
List of names of attributes to be treated. For more information see |
The input DB where the result of the operation is added as a new variable called "fun"
data(Z_data.db) # Load the Documentation Points Db Z_data.db # Print a short contents of the Db # Calculate the new variable 'mean' # which is obtained as the average # between variables 'z1' and 'z2'. # The new variable is now the locator 'z1' Z_data.db <- db.compare(Z_data.db,fun="mean",names=c(4,5)) # Print the contents of the new variable # print(Z_data.db,name="z1",flag.print=TRUE) # Clean the data set # rm(Z_data.db)