seqdecomp | R Documentation |
States can be represented by any substring that does not include the sep
value. An empty separator sep = ""
can only be used when each state is coded with a single character.
seqdecomp(data, var=NULL, sep='-', miss="NA", vnames=NULL)
data |
a dataframe, matrix, or character string vector containing sequence data (tibble will be converted with |
var |
the list of columns containing the sequences. Default is |
sep |
the between states/events separator used in the input data set. Default is ' |
miss |
the symbol for missing values (if any) used in the input data set. Default is |
vnames |
optional names for the column/variables of the output data set. Default is |
seqconc
.
# 1 sequence of length 4
seqdecomp("A-BB-C-DD")
# 2 sequences of length 6
seqdecomp(c("ABBCDD","BBCCAD"),sep="")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.