methods-correspondence {ordr} | R Documentation |
Functionality for correspondence analysis ('correspondence') objects
Description
These methods extract data from, and attribute new data to,
objects of class "correspondence"
from the MASS
package.
Usage
## S3 method for class 'correspondence'
as_tbl_ord(x)
## S3 method for class 'correspondence'
recover_rows(x)
## S3 method for class 'correspondence'
recover_cols(x)
## S3 method for class 'correspondence'
recover_inertia(x)
## S3 method for class 'correspondence'
recover_conference(x)
## S3 method for class 'correspondence'
recover_coord(x)
## S3 method for class 'correspondence'
recover_aug_rows(x)
## S3 method for class 'correspondence'
recover_aug_cols(x)
## S3 method for class 'correspondence'
recover_aug_coord(x)
Arguments
x |
An ordination object. |
Value
The recovery generics recover_*()
return core model components, distribution of inertia,
supplementary elements, and intrinsic metadata; but they require methods for each model class to
tell them what these components are.
The generic as_tbl_ord()
returns its input wrapped in the 'tbl_ord'
class. Its methods determine what model classes it is allowed to wrap. It
then provides 'tbl_ord' methods with access to the recoverers and hence to
the model components.
See Also
Other methods for singular value decomposition-based techniques:
methods-cancor
,
methods-lda
,
methods-lra
,
methods-mca
,
methods-prcomp
,
methods-princomp
,
methods-svd
Other models from the MASS package:
methods-lda
,
methods-mca
Examples
# table of hair and eye color data collapsed by sex
data(quine, package = "MASS")
class(quine)
head(quine)
# use correspondence analysis to construct row and column profiles
(quine_ca <- MASS::corresp(~ Age + Eth, data = quine))
(quine_ca <- as_tbl_ord(quine_ca))
# recover row and column profiles
get_rows(quine_ca)
get_cols(quine_ca)
# augment profiles with names, masses, distances, and inertias
(quine_ca <- augment_ord(quine_ca))