db.indicator {RGeostats}R Documentation

Convert from continuous to several indicator variables

Description

Convert from continuous to several indicator variables

Usage

db.indicator(db, limits=limits.input(), name=db.getname(db,"z",1),
             flag.indic=TRUE, verbose=FALSE,
             radix="Indicator", modify.target=db.locmod())

Arguments

db

The db-class where the continuous variable must be translated

limits

The limits-class structure describing the parameters of the Limiting operation. If no limits-class is defined, an interactive procedure is provided.

name

Name of the variable of interest. By default, this is set to the first z-locator variable.

flag.indic

When switched ON, the function calculates the indicator variables.

When switched OFF, it calculates the discretized variable: each sample contains the average value of the variable within the class to which it belongs.

For more information, see the "Value" paragraph.

verbose

Verbose flag. When switched ON, the number of samples per class is printed out.

radix

Radix of the name given to the variables storing the results in the target Db.

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 db-class structure contains the result of this function.

If 'flag.indic' is switched ON, the db-class will contain the new indicator variables. There are as many new variables as they are classes. Each sample of the indicator variable for class 'iclass' is set to 1 if the sample belongs to this class or 0 otherwise.

If 'flag.indic' is switched OFF, the db-class will contain a variable such that each sample contains the variable average calculated over the samples whose value belong to this class.


[Package RGeostats version 11.0.6 Index]