### 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