Learn R Programming

longitudinalData (version 0.6.4)

LongData-class: ~ Class: LongData ~

Description

LongData is an objet containing the longitudinal data (the individual trajectories) and some associate value (like time, individual identifiant,...)

Arguments

Objects from the Class

Object LongData can be created either directly by calling the fonction longData or form an existing structure (data.frame or matrix) by using as.longData.

Construction

Object LongData can be created either directly by calling the fonction longData (build from scratch) or via as.longData (turning a data.frame into a LongData).

Author(s)

Christophe Genolini PSIGIAM: Paris Sud Innovation Group in Adolescent Mental Health INSERM U669 / Maison de Solenn / Paris Contact author :

References

Article submited

See Also

Overview: longitudinalData-package Methods: longData, as.longData, selectSupTrajMinSize, imputation, criterion Plot: plot(LongData),plotSubGroups(LongData)

Examples

Run this code
### building longData
mat <- matrix(c(NA,2,3,4,1,6,2,5,1,3,8,10),4)
ld <- new("LongData",id=c("I1","I2","I3","I4"),time=c(2,4,8),varName="Age",traj=mat)

### '[' and '[<-'
ld["id"]
ld["time"]<- c(1,3,9)
ld["varName"]
ld["traj"]
ld["traj"][3,]<-c(2,7,9)
(ld)

### Plot
plot(ld,type.mean="n",legend=FALSE)

### Only trajectories with at least 3 values
selectSupTrajMinSize(ld,3)

Run the code above in your browser using DataLab