seqelength {TraMineR} | R Documentation |
The length of an event sequence is its time span, i.e. the total time of observation. This information is optional but may be useful to perform for instance a survival analysis.
seqelength
retrieves the length the given sequences.
seqesetlength
sets the length of the sequences.
seqelength(s) seqesetlength(s,len)
s |
An event sequence object (seqelist ). |
len |
A list of sequence lengths. |
seqelength
returns a numeric vector with the length of each sequences.
data(actcal.tse) actcal.seqe <- seqecreate(actcal.tse) ##time to end is added sl <- numeric() sl[1:2000] <- 12 ##All sequences with same length seqesetlength(actcal.seqe, sl) actcal.seqe[1:10] ##Retrieve length seqelength(actcal.seqe)