View source: R/print.efa_loadings.R
| print.efa_loadings | R Documentation |
Print a loading matrix
## S3 method for class 'efa_loadings'
print(x, ...)
## S3 method for class 'efa_loadings'
format(
x,
cutoff = 0.3,
digits = 3,
max_name_length = 10,
h2 = NULL,
color = TRUE,
name_style = c("truncate", "abbreviate", "full"),
max_factor_name_length = NULL,
max_factors_per_block = NULL,
sort_loadings = c("none", "primary", "clustered"),
legend = FALSE,
...
)
x |
a loading matrix of class |
... |
additional arguments passed to print or format |
cutoff |
numeric. The value at or above which loadings are emphasized; default is .3. |
digits |
numeric. Passed to |
max_name_length |
numeric. The maximum length of the variable names to
display. Everything beyond this will be cut from the right unless
|
h2 |
numeric. Vector of communalities to print. If named and |
color |
logical. Whether to apply console styling using cli.
Default is |
name_style |
character. How to shorten variable names longer than
|
max_factor_name_length |
numeric or |
max_factors_per_block |
numeric or |
sort_loadings |
character. Optional row sorting. |
legend |
logical. Whether to append a short explanation of the styling.
Default is |
The method prints a loading matrix in a compact, console-oriented table.
Loadings with absolute value greater than or equal to cutoff are emphasized,
smaller loadings are de-emphasized, and Heywood-relevant communality/
uniqueness values are marked when h2 is supplied. Long variable names can
be truncated, abbreviated, or printed in full. If the matrix has many factor
columns, the table is split into column blocks so that the output remains
readable in narrower consoles.
If h2 is named and x has row names, h2 is matched to the row names of
x before any optional row sorting is applied. If x has no row names, a
named h2 vector is used in the supplied order.
print() returns its argument x invisibly; it is
cat(format(x, ...), sep = "\n") followed by a blank line for console
spacing. format() returns a character vector with the table lines (styled
to the active console theme; plain when colours are disabled).
EFAtools_PAF <- efa_fit(test_models$baseline$cormat, n_factors = 3, N = 500,
estimator = "PAF", rotation = "promax")
EFAtools_PAF
# format() returns the same lines as a character vector:
writeLines(format(EFAtools_PAF$rot_loadings))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.