| sfa_corplot | R Documentation |
Draws a cor.plot heatmap of a semantic similarity matrix
with sensible defaults for a many-item scale. By default the items are
grouped by their subscale/factor (so each construct forms a block on
the diagonal), the bulky transformed-embeddings attribute is removed, and all
axis labels are shown.
sfa_corplot(
x,
factors = NULL,
labels = NULL,
group = TRUE,
order = NULL,
numbers = FALSE,
upper = TRUE,
gap.axis = -1,
cex.axis = 0.75,
xlas = 2,
...
)
x |
An |
factors |
Optional per-item subscale labels used to group the items. For
an |
labels |
Optional per-item axis labels. By default uses short item codes
(the |
group |
Logical: reorder items so each factor forms a contiguous block
(default |
order |
Optional character vector giving the order of the factor blocks
(default: alphabetical). Entries are matched to the factor labels by exact,
case-insensitive, or unique-prefix match, so for Depression/Anxiety/Stress
both |
numbers, upper, gap.axis, cex.axis, xlas |
Passed to
|
... |
Further arguments passed to |
Grouping happens only for display — the underlying similarity matrix from
sfa_similarity keeps its original item order (rows aligned with
the items' scoring, codes, and embeddings), which the rest of the package
relies on.
The (grouped, relabelled) matrix that was plotted, invisibly.
sfa_similarity, sfa
data(big5)
fit <- sfa(
data.frame(code = big5$codes, item = big5$items,
factor = big5$factors, scoring = big5$scoring),
embeddings = big5$embeddings, scoring = big5$scoring, nfactors = 5)
sfa_corplot(fit) # heatmap, grouped by the Big Five
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.