Learn R Programming

EFAtools (version 1.0.0)

print.efa_average: 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; print() is cat(format(x), sep = "\n"). 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 efa_average
print(x, stat = c("average", "range"), plot = FALSE, ...)

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

Value

print() returns its argument x invisibly. format() returns a character vector with the report lines (styled to the active console theme; plain when colours are disabled).

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().

...

Not used; for consistency with the generic.

Examples

Run this code
# \donttest{
EFA_aver <- efa_average(test_models$baseline$cormat, n_factors = 3, N = 500)
EFA_aver

# format() returns the same lines as plain text:
writeLines(format(EFA_aver))
# }

Run the code above in your browser using DataLab