longData
is the constructor of the class LongData
.longData(traj, id, time, varName,other)
[matrix(numeric)]
: structure containning the trajectories.[vector(character)]
: single identifier for each trajectory (ie each individual).[vector(numeric)]
: time at which measures were made.[character]
: name of the variable being measured.[list]
: list of additionnal information.LongData
.longData
construct a object of class
LongData
. It does not provide any default
values.### 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"))
Run the code above in your browser using DataLab