selectivity {RGeostats}R Documentation

Calculate the grade-tonnage values

Description

Calculate the grade-tonnage values

Usage

selectivity(x, w=NA, zname=NA, wname=NA, cuts=NA, ncut=100,verbose=FALSE,
            flag.correct=TRUE, flag.plot=TRUE, ...)

Arguments

x

This argument can be either:

  • The anam-class Class containing the Anamorphosis characteristics

  • A db-class object containing the target variables

  • A vector of numeric values

w

Vector containing the (optional) weight. This vector will be used only when 'x' is provided as a vector numeric values. When 'x' corresponds to a db-class, the (optional) weight is provided by a (locator "w") variable.

zname

When the argument 'x' corresponds to a db-class object, the name of the variable of interest can be given. By default, this variable will be the one with locator "z1".

wname

When the argument 'x' corresponds to a db-class object, the name of the weight variable can be given. By default, this variable will be the one with locator "w".

cuts

Array containing the cutoffs for which calculations must be performed. If not specified, these cutoffs are generated automatically. In the case of Selectivity curves calculated from a Model (argument 'x' refers to a Model (anam-class), and if the Model is Discrete, then the cutoffs are the ones of the Model and the current argument is useless (they do not need to be defined explicitely as they will be generated automatically by the program).

ncut

When the cutoffs are generated automatically, this argument specifies the number of discretized cutoffs between the minimum and the maximum.

verbose

Verbose flag. If switched ON, the value of the GINI index is printed.

flag.correct

When TRUE, the Tonnages are corrected in order to ensure the order relationship before calculating other quantities.

flag.plot

When TRUE, the result of the Selectivity function is plotted. Otherwise, the resulting array is produced as output. See Details for more information.

...

Arguments passed to function selectivity.curve.

Value

An array containing the different recovery functions. The number of rows corresponds to the number of cutoffs. There are five columns organized as follows:

The lines are provided in ascending cutoff order.

Examples

data(Z_parcelles100) # Data set 100 data
data(Z_parcelles25)  # Data set 25 data

# Draw Metal/Tonnage for 100 samples
selectivity(Z_parcelles100)
#Overlay the Metal/Tonnage for 25 samples
selectivity(Z_parcelles25,new=FALSE)

rm(Z_parcelles100,Z_parcelles25) # Cleanup

[Package RGeostats version 11.0.6 Index]