tidy_sequence_data: Convert output of TraMineR::seqdef to tidy dataframe

Description Usage Arguments Value Examples

View source: R/helpers.R

Description

Converts the output matrix of TraMineR::seqdef into a tidy tibble

Usage

1
tidy_sequence_data(sequence_data)

Arguments

sequence_data

an object created from TraMineR::seqdef

Value

tibble

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(TraMineR)
data(mvad)
seqstatl(mvad[, 17:86])
mvad.alphabet <- c("employment", "FE", "HE", "joblessness", "school",
                   "training")
mvad.labels <- c("employment", "further education", "higher education",
                 "joblessness", "school", "training")
mvad.seq <- seqdef(mvad, 17:86, alphabet = mvad.alphabet, # states = mvad.scodes,
                   labels = mvad.labels, xtstep = 6)
tidy_sequence_data(mvad.seq)

joemarlo/sequenchr documentation built on Sept. 29, 2021, 12:23 a.m.