Description Usage Arguments Value Author(s) See Also Examples
The objects of class kasc
may contain maps of type "numeric"
(e.g. the elevation) or of type "factor"
(e.g. the type of
vegetation). With convnum
, factor maps are transformed into a
collection of k maps of type "numeric" (where k is the number of levels
of the factor), with zero means and unit variance (see dudi.mix in the
ade4 package for further details). Additionaly, maps of type "numeric"
are also centered and scaled (see dudi.mix
in the
ade4
package for further details).
1 |
kasc |
an object of class |
Returns a list with the following components:
kasc |
an object of class |
weight |
the weights associated with each map of the object kasc, so that the collection of maps defining a categorical variable has the same weight as a numeric variable (see examples). |
Clement Calenge clement.calenge@oncfs.gouv.fr
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## loads the data
data(puechabon)
kasc <- puechabon$kasc
image(kasc)
## scales all the variables
toto <- convnum(kasc)
image(toto$kasc)
## the Aspect has four levels:
## four variables have been defined.
toto$weight
## The sum of the weights given to each
## level of aspect is equal to:
toto$weight[2:5]
sum(toto$weight[2:5])
## The same weight is therefore given to the factor variable Aspect and
## to any continuous variable, e.g. the elevation.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.