View source: R/toPersonPeriod.R
toPersonPeriod | R Documentation |
Converts the STS sequences of a state sequence object into person-period format.
toPersonPeriod(seqdata)
seqdata |
A state sequence object as returned by |
A data frame with three columns: id
, state
and timestamp
.
Matthias Studer
seqformat
.
data(mvad)
mvad.labels <- c("employment", "further education", "higher education",
"joblessness", "school", "training")
mvad.scodes <- c("EM", "FE", "HE", "JL", "SC", "TR")
mvad.seq <- seqdef(mvad, 15:86, states = mvad.scodes, labels = mvad.labels)
mvad2 <- toPersonPeriod(mvad.seq[1:20,])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.