Description Usage Arguments Value Author(s) See Also Examples
An object of class kasc
stores several maps in a data frame
(one column per variable, and one row per pixel of the raster map).
However, the features mapped are rarely rectangle-shaped, whereas the
map are inevitably rectangles. Therefore, a lot of pixels of the maps
do not contain data. The pixels of the map that do not contain data
are NA
in this data frame. kasc2df
will "clean" the
object of class kasc
from these NAs, and will return a data
frame containing only mapped values that can be used in subsequent
analysis.
After these analyses, df2kasc
may be used to convert the
modified data frame to an object of
class kasc
for mapping (e.g. for maps of factorial axes,
using dudi
analyses, see help(dudi.pca)
).
1 2 |
x |
an object of class |
var |
a character vector. The names of the variables in the
|
df |
a data frame resulting from a computation of the component
|
index |
an integer vector giving the position of the rows of
|
kasc2df
returns a list with the following components:
tab |
a data frame without NAs, with a number of variables equals
to |
index |
a vector of indices of the rows of the |
df2kasc
returns an object of class kasc
.
Clement Calenge clement.calenge@oncfs.gouv.fr
kasc
for additional information on
objects of class kasc
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | data(puechabon)
kasc <- puechabon$kasc
# Display the kasc object
image(kasc)
# Preparation for Principal component analysis
x <- kasc2df(kasc)
x$tab <- x$tab[, (names(x$tab) != "Aspect")]
# Principal component analysis
ana <- dudi.pca(x$tab, scannf = FALSE)
s.corcircle(ana$co)
s.label(ana$li, clab = 0)
## Map of the scores of the rows
scores <- df2kasc(ana$li, x$index, kasc)
image(scores)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.