Learn R Programming

kml3d (version 0.6)

longData: ~ Function: longData ~

Description

longData is the constructor of the class LongData.

Usage

longData(traj, idAll, time, varNames, maxNA)

Arguments

traj
[array(numeric)]: structure containning the trajectories.
idAll
[vector(character)]: single identifier for each trajectory (ie each individual).
time
[vector(numeric)]: time at which measures are made.
varNames
[character]: names of the variable being measured.
maxNA
[numeric] or [vector(numeric)]: Fixes the number of maximum missing values that can be tolerate in a trajectories; Should this number be exceed maxNA, the trajectories would be removed from traj and

Value

  • An object of class LongData.

Author(s)

Christophe Genolini INSERM U669 / PSIGIAM: Paris Sud Innovation Group in Adolescent Mental Health Modal'X / Universite Paris Ouest-Nanterre- La Defense Contact author : genolini@u-paris10.fr

Details

longData construct a object of class LongData. It does not provide any default values except for maxNA which is length(time)-2.

References

Article "KmL: K-means for Longitudinal Data", in Computational Statistics, Volume 25, Issue 2 (2010), Page 317. Web site: http://christophe.genolini.free.fr/kml

See Also

as.longData, LongData

Examples

Run this code
### Building longData
tr1 <- array(c(1,2,3,1,4, 3,6,1,8,10, 1,2,1,3,2, 4,2,5,6,3, 4,3,4,4,4, 7,6,5,5,4),
            dim=c(3,5,2))

longData(
    traj=tr1,
    idAll=as.character(c(100,102,103)),
    time=c(1,2,4,8,15),
    varNames=c("P","A"),
    maxNA=3
    )

Run the code above in your browser using DataLab