Learn R Programming

ferrn (version 0.3.0)

flip_sign: Helper functions for `explore_space_pca()`

Description

Helper functions for `explore_space_pca()`

Usage

flip_sign(dt, group = NULL, ...)

compute_pca(dt, group = NULL, random = TRUE, flip = TRUE, ...)

Value

flip_sign(): a list containing a matrix of all the bases, a logical value indicating whether a flip of sign is performed, and a data frame of the original dataset.

compute_pca(): a list containing the PCA summary and a data frame with PC coordinates augmented.

Arguments

dt

a data object collected by the projection pursuit guided tour optimisation in tourr

group

the variable to label different runs of the optimiser(s)

...

other arguments received from explore_space_pca()

random

logical; if random bases from the basis space need to be added to the data

flip

logical; if the sign flipping need to be performed

Examples

Run this code
dt <- dplyr::bind_rows(holes_1d_geo, holes_1d_better)
 flip_sign(dt, group = method) %>% str(max = 1)
compute_pca(dt, group = method)

Run the code above in your browser using DataLab