seqelength {TraMineR} | R Documentation |
The length of event sequence correspond to the total time of observation of the corresponding individual. This information is optional but can be used to perform survival analysis.
seqelength
can be used to retrieve the length of some sequences.
seqesetlength
can be used to set the length of these sequences.
seqelength(s) seqesetlength(s,len)
s |
A list of sequences. |
len |
A list of time corresponding to each sequences. |
seqelength
return 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)