print.efa_average: Print and format an efa_average object

View source: R/print.efa_average.R

print.efa_averageR Documentation

Print and format an efa_average object

Description

print() shows a summarised output of the efa_average() function: the averaging settings, the error/convergence/Heywood/admissibility rates, the indicator-to-factor correspondences, the averaged loadings (and, for oblique solutions, the factor intercorrelations), the variances accounted for, and the model fit. format() assembles the same report and returns it as a character vector; by default (plot = FALSE) print() is cat(format(x), sep = "\n"). With plot = TRUE it additionally draws the loading plot, which is the one thing format() cannot return: the printed lines are the same, but the call has a side effect beyond them. The lines follow the active console theme, so they are plain when colours are disabled (for example when captured into a file or stripped with cli::ansi_strip()).

Usage

## S3 method for class 'efa_average'
print(x, stat = c("average", "range"), plot = FALSE, ...)

## S3 method for class 'efa_average'
format(x, stat = c("average", "range"), ...)

Arguments

x

An object of class efa_average (output from efa_average()).

stat

character. A vector with the statistics to print. Possible inputs are "average", "sd", "range", "min", and "max". Default is "average" and "range".

plot

logical. Whether a plot of the average and min- max loadings should be created. Default is FALSE. If more than 10 factors are extracted, no plot is created. Only used by print(); plot.efa_average() draws the same plot and returns it, so it is the route to take when the plot object itself is wanted.

...

Not used; for consistency with the generic.

Value

print() returns its argument x invisibly. format() returns a character vector with the report lines.

Examples


EFA_aver <- efa_average(test_models$baseline$cormat, n_factors = 3, N = 500)
EFA_aver

# format() returns the same lines as a character vector:
writeLines(format(EFA_aver))


EFAtools documentation built on Aug. 21, 2026, 5:16 p.m.