db.stat.simu {RGeostats}R Documentation

Pointwise statistics

Description

Calculate pointwise statistics between several variables in a Db

Usage

db.stat.simu(db, fun = "mean", names = db.getname(db,"z",1),
	           zmin=NA, zmax=NA, proba=NA,
		 	       radix=NA, modify.target=db.locmod())

Arguments

db

The db-class structure where the variables are stored

fun

The code giving the operation that must be performed between the different variables at the same point:

  • "NUM" : Number of valid samples

  • "MEAN" : Mean over the valid samples

  • "VAR" : Variance over the valid samples

  • "STDV" : Standard deviation over the valid samples

  • "MINI" : Minimum over the valid samples

  • "MAXI" : Maximum over the valid samples

  • "SUM" : Sum over the different variables for the valid samples

  • "PROP" : Proportion of variables belonging to [zmin;zmax]

  • "QUANT" : Quantile at a given probability 'proba'

  • "T" : Tonnage belonging to [zmin;zmax] (same as "prop")

  • "Q" : Metal quantity belonging to [zmin;zmax]

  • "M" : Average recovered grade belonging to [zmin;zmax]

  • "B" : Conventional benefit belonging to [zmin;zmax]

names

List of names of attributes to be treated. For more information see db.ident.

zmin

Minimum bound of the interval used to calculate the proportion criterion. Set it to NA for an interval without any lower bound.

zmax

Maximum bound of the interval used to calculate the proportion criterion. Set it to NA for an interval without any upper bound.

proba

Probability used to calculate the quantile value.

radix

Radix of the name given to the variable storing the result in the Db. If not specified, the radix will be ignored.

modify.target

Decides whether or not the newly created variables will have their locator defined or not. For more information, see db.locmod.

Value

The input DB where the result of the operation is added as a new variable called "fun"

See Also

db-class

Examples

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.stat.simu(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)

[Package RGeostats version 14.0.10 Index]