View source: R/print.efa_average.R
| print.efa_average | R Documentation |
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()).
## 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"), ...)
x |
An object of class |
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 |
... |
Not used; for consistency with the generic. |
print() returns its argument x invisibly. format() returns a
character vector with the report lines.
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.