% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/print.efa_average.R
\name{print.efa_average}
\alias{print.efa_average}
\alias{format.efa_average}
\title{Print and format an efa_average object}
\usage{
\method{print}{efa_average}(x, stat = c("average", "range"), plot = FALSE, ...)

\method{format}{efa_average}(x, stat = c("average", "range"), ...)
}
\arguments{
\item{x}{An object of class \code{efa_average} (output from \code{\link[=efa_average]{efa_average()}}).}

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

\item{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 \code{print()}; \code{\link[=plot.efa_average]{plot.efa_average()}} draws the same plot and
returns it, so it is the route to take when the plot object itself is wanted.}

\item{...}{Not used; for consistency with the generic.}
}
\value{
\code{print()} returns its argument \code{x} invisibly. \code{format()} returns a
character vector with the report lines.
}
\description{
\code{print()} shows a summarised output of the \code{\link[=efa_average]{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. \code{format()} assembles the same report and returns it as a character
vector; by default (\code{plot = FALSE}) \code{print()} is \code{cat(format(x), sep = "\\n")}.
With \code{plot = TRUE} it additionally draws the loading plot, which is the one
thing \code{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 \code{\link[cli:ansi_strip]{cli::ansi_strip()}}).
}
\examples{
\donttest{
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))
}
}
