Usage
seqformat(data, var=NULL, id=NULL, from=NULL, to=NULL,
nrep=NULL, tevent=NULL, stsep="-", covar=NULL)Arguments
data
a data frame or matrix containing sequence data.
var
the list of columns containing the sequences. Defaut to NULL, ie all the columns.
Whether the sequences are in the compressed (character strings) or extended format is automatically detected by counting the number of columns.
id
identification number for the sequences. When using SPELL formt as input, this identification number is mandatory, in order to identify all spells belonging to each individual in the data set.
from
format of the original data. Avalaible formats are: STS, SPS, SPELL
to
format of the output data. Avalaible formats are: STS, SPS, SPELL, SRS, TSE
nrep
number of previous states replicated, for the 'SRS' format
tevent
when converting to time-stamped-event (TSE) format, a matrix of size 'ns' * 'ns' where 'ns' is the number of distinct states appearing in the sequences must be given. In this matrix, the cell a,b contains all events associated with a transition from state
stsep
the character used as separator in the original data if input format is separated character strings. By default, "-".
covar
the list of columns containing associated covariates to be included in the output data frame. If to='SRS' is choosed, the covariates are replicated accross each row. Default to NULL.