Opn: Builds an Opn object

View source: R/cl-def-Opn.R

OpnR Documentation

Builds an Opn object

Description

In Momocs, Opn classes objects are lists of open outlines, with optionnal components, on which generic methods such as plotting methods (e.g. stack) and specific methods (e.g. npoly can be applied. Opn objects are primarily Coo objects.

Usage

Opn(x, fac = dplyr::tibble(), ldk = list())

Arguments

x

list of matrices of (x; y) coordinates, or an array, or a data.frame (and friends)

fac

(optionnal) a data.frame of factors and/or numerics specifying the grouping structure

ldk

(optionnal) list of landmarks as row number indices

Value

an Opn object

See Also

Other classes: Coe(), Coo(), Ldk(), OpnCoe(), OutCoe(), Out(), TraCoe()

Examples

#Methods on Opn
methods(class=Opn)
# we load some open outlines. See ?olea for credits
olea
panel(olea)
# orthogonal polynomials
op <- opoly(olea, degree=5)
# we print the Coe
op
# Let's do a PCA on it
op.p <- PCA(op)
plot(op.p, 'domes')
plot(op.p, 'var')
# and now an LDA after a PCA
olda <- LDA(PCA(op), 'var')
# for CV table and others
olda
plot_LDA(olda)

MomX/Momocs documentation built on Nov. 18, 2023, 10:53 p.m.