longData {longitudinalData} | R Documentation |
longData
is the constructor of the class LongData
.
longData(traj, id, time, varName,other)
traj |
[matrix(numeric)] : structure containning the trajectories. |
id |
[vector(character)] : single identifier for each trajectory (ie each individual). |
time |
[vector(numeric)] : time at which measures were made. |
varName |
[character] : name of the variable being measured. |
other |
[list] : list of additionnal information. |
longData
construct a object of class
LongData
. It does not provide any default
values.
An object of class LongData
.
### Small data mat <- matrix(c(1,NA,3,2,3,6,1,8,10),3,3,dimnames=list(c(101,102,104),c("T2","T4","T8"))) (ld1 <- longData(traj=mat,id=as.character(c(101,102,104)),time=c(2,4,8),varName="T",other=list())) plot(ld1,col=1,type.mean="n") ### Big data mat <- matrix(runif(1051*325),1051,325) (ld2 <- longData(traj=mat,id=paste("I-",1:1051,sep=""),time=(1:325)+0.5,varName="Random"))