Learn R Programming

EFAtools (version 0.8.0)

print.SL: Print and format an SL object

Description

print() shows a summarised output of the SL function: a model header (when the settings are available), the Schmid-Leiman loading matrix, and the variances accounted for. 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 SL
print(x, ...)

# S3 method for SL format(x, ...)

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 SL (output from SL()).

...

Not used; for consistency with the generic.

Examples

Run this code
EFA_mod <- EFA(test_models$baseline$cormat, N = 500, n_factors = 3,
               type = "EFAtools", method = "PAF", rotation = "promax")
sl_mod <- SL(EFA_mod, type = "EFAtools", method = "PAF")
sl_mod

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

Run the code above in your browser using DataLab