View source: R/sequence-adapters.R
| as_grpstring_data | R Documentation |
Create GrpString-compatible event and string inputs
as_grpstring_data(
data,
sequence_id_col = "sequence_id",
order_col = "sequence_order",
state_col = "state",
alphabet = NULL
)
data |
Long-format sequence data. |
sequence_id_col, order_col, state_col |
Sequence columns. |
alphabet |
Optional single-character symbols. When omitted, printable ASCII characters are assigned deterministically. |
A list of class gp3_grpstring_input containing a wide event data
frame, event-name vector, character vector, conversion key, and string vector.
sequences <- data.frame(
sequence_id = rep(c("s1", "s2", "s3", "s4"), each = 4L),
sequence_order = rep(1:4, times = 4L),
state = c("A", "B", "C", "D", "A", "B", "C", "C",
"D", "C", "B", "A", "D", "C", "A", "A"),
group = rep(c("g1", "g2"), each = 8L),
stringsAsFactors = FALSE
)
as_grpstring_data(sequences)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.