fa_loadings: Get loadings from a factor analysis object.

View source: R/factor_analysis.R

fa_loadingsR Documentation

Get loadings from a factor analysis object.

Description

Extract loadings from a factor analysis object of class "fa") into a data.frame.

Usage

fa_loadings(fa, threshold = NA, long_form = F)

Arguments

fa

(object of class "fa") A factor analysis object.

threshold

(num) A threshold for loadings to include.

long_form

(lgl) Whether to return data frame in long format. Default is no. Useful for plotting.

Examples

mpg_numeric = mpg %>% select(where(is.numeric))
fa_loadings(psych::fa(mpg_numeric))
fa_loadings(psych::fa(mpg_numeric, 2))
fa_loadings(psych::fa(mpg_numeric, 2), long_form = T)
fa_loadings(psych::fa(mpg_numeric, 2), .40)
fa_loadings(psych::fa(mpg_numeric, 2), .20, long_form = T)

Deleetdk/kirkegaard documentation built on April 22, 2024, 5:22 p.m.