View source: R/sequence-panel.R
| plot_sequence_panel_changes | R Documentation |
Plot longitudinal sequence changes
plot_sequence_panel_changes(
changes,
metric = c("distance", "length_change", "transition_change"),
type = c("individual", "summary"),
...
)
changes |
A result from |
metric |
One of |
type |
Plot individual panel trajectories or occasion-transition means. |
... |
Additional graphical arguments passed to base plotting functions. |
The plotted data, invisibly.
panel_data <- data.frame(
participant_id = rep(c("p1", "p2"), each = 6L),
occasion = rep(rep(c(1, 2), each = 3L), times = 2L),
sequence_id = rep(c("a", "b", "c", "d"), each = 3L),
sequence_order = rep(1:3, times = 4L),
state = c("A", "B", "C", "A", "C", "C", "C", "B", "A", "C", "B", "B")
)
changes <- compare_sequence_panel_changes(
prepare_sequence_panel(panel_data, "participant_id", "occasion")
)
plot_sequence_panel_changes(changes)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.