as.clusterizLongData {kml} | R Documentation |
as.cld.data.frame
turn a matrix into an object of class ClusterizLongData
.
as.cld(data,id=data[,1],timeCol=2:length(data),timeReal=0:(length(timeCol)-1),trajSizeMin=2, varName=sub("[[:digit:]]*$","",names(data)[timeCol[1]]),...) as.cld.data.frame(data,id=data[,1],timeCol=2:length(data),timeReal=0:(length(timeCol)-1),trajSizeMin=2, varName=sub("[[:digit:]]*$","",names(data)[timeCol[1]]),...)
data |
[data.frame] : contains longitudinal data. Each
ligne refers to the trajectory of an individual. Each column refers to
the time at which measures were made. Optionnaly, a column may
refer to identifiers. |
|
[character] : single identifier
for each trajectory (ie each individual). By default,id is the first column of the data.frame . |
|
[numeric] : column number in which
longitudinal data can be found. By default,timeCol is all the
columns except for the first. |
|
[numeric] : time at which measures were
made. By default,timeReal is 0:(length(timeCol)-1) . |
|
[character] :
Name of the variable being measured. By default, the name of the second column after having suppressed the numbers is chosen. |
|
[numeric] :
The trajectories that include missing values can either be excluded or included. trajSizeMin sets the minimum number of values that a trajectory must contain not to be excluded. Please note that trajectories that are completely missing (0 present values) must always be excluded. |
... |
For compatibility only |
as.cld
apply on a data.frame
turn the data.frame
into an object of class
ClusterizLongData
. Each line of the data frame
refers to a trajectory (an individual), the columns specified in timeCol
are the time.
An object of class ClusterizLongData
.
Christophe Genolini
PSIGIAM: Paris Sud Innovation Group in Adolescent Mental Health
INSERM U669 / Maison de Solenn / Paris
Responsable : <genolini@u-paris10.fr>
Raphaël Ricaud
Laboratoire "Sport & Culture" / "Sports & Culture" Laboratory
University of Paris 10 / Nanterre
as.cld
, as.cld.matrix
,
as.cld.artificialLongData
, kml-package
### Simple use dn <- data.frame(i=11:13,size12=c(15,13,14),size14=c(16,15,17),size20=c(18,16,16)) as.cld(dn) ### Changing parameters as.cld(dn,i=101:103,timeCol=c(2,3,2,4,2),timeReal=c(1,2,4,8,16))