Skip to contents

Creats a plot of factor loadings

Usage

plot_loading(
  f,
  font_family = "sans",
  font_size = 14,
  loading_text_size = font_size * 0.8,
  factor_names = sort(colnames(f$loadings)),
  nudge_loadings = 0.05
)

Arguments

f

output of a factor analysis from the psych::fa function

font_family

Name of font

font_size

Size of font

loading_text_size

size of loading font,

factor_names

names of the factors #'

nudge_loadings

nudge loadings on x dimension

Examples

library(GPArotation)
library(psych)
#> 
#> Attaching package: 'psych'
#> The following objects are masked from 'package:GPArotation':
#> 
#>     equamax, varimin
#> The following objects are masked from 'package:ggplot2':
#> 
#>     %+%, alpha
fit <- fa(psych::bfi[,1:25], nfactors = 5)
plot_loading(fit)