| tidy.ackwards | R Documentation |
Returns structured data from an ackwards object in tidy format. The
default (what = "edges") returns the graph edge list that drives diagrams.
## S3 method for class 'ackwards'
tidy(
x,
what = c("edges", "loadings", "variance", "fit", "nodes", "scores"),
primary_only = FALSE,
sort = c("none", "strength"),
format = c("long", "wide"),
conf_level = 0.95,
...
)
x |
An |
what |
What to extract:
|
primary_only |
For |
sort |
For |
format |
For |
conf_level |
For |
... |
Ignored. |
A data frame (class data.frame).
If factor labels have been attached to the object, the
output gains display-only label columns: factor_label for what = "loadings", "variance", or "scores", and from_label/to_label for
what = "edges". Each carries the label for a labeled factor and NA
otherwise. These columns are absent when no labels are set, so an
unlabeled object's output is unchanged; the ID columns (factor, from,
to) are never altered.
glance.ackwards(), print.ackwards(), set_factor_labels()
x <- ackwards(sim16, k_max = 5)
tidy(x) # edges in natural order
tidy(x, sort = "strength") # strongest edges first
tidy(x, primary_only = TRUE) # just the primary-parent lineage
tidy(x, what = "loadings")
tidy(x, what = "variance")
tidy(x, what = "fit")
tidy(x, what = "fit", format = "wide")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.