as.clusterizLongData {kml} | R Documentation |
as.clusterizLongData
(or as.cld
) turns a data.frame into an object of class ClusterizLongData
.
as.cld(data, ...) #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.clusterizLongData(data, ...) #as.clusterizLongData(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 the trajectories (longitudinal data). Each
ligne refers to the trajectory of an individual. Each column refers to
the time at which measures were made. Optionnaly, the fisrt column may
refer to identifiers. |
id |
[character] : single identifier
for each trajectory (ie each individual). By default,id is the first column of the data.frame . |
timeCol |
[numeric] : column number in which
longitudinal data can be found. By default,timeCol is all the
columns except for the first. |
timeReal |
[numeric] : time at which measures were
made in "real" life. By default,timeReal is 0:(length(timeCol)-1) . |
varName |
[character] :
Name of the variable being measured. By default, the name of the
second column after suppressing the numbers is chosen (if the name
of the second column is SizeAt4 , then varName will be SizeAt ). |
trajSizeMin |
[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. For example, if the trajectories have 7 mesurements
(time=7 ) and trajSizeMin is set to 3, the trajectory
(5,3,NA,4,NA,NA,NA) will be include in the calculation while
(2,NA,NA,NA,4,NA,NA) will be exclude. 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
Article submited
Web site: http://christophe.genolini.free.fr/kml
Overview: kml-package
Classes : ClusterizLongData
Methods : clusterizLongData
, generateArtificialLongData
Plot : plot: overview
, plot(ClusterizLongData)
,
plot(Calinski)
,
plotSubGroups(ClusterizLongData)
, plotAll(ClusterizLongData)
### Simple use dn <- data.frame(i=11:13,size12=c(15,13,14),size14=c(16,15,17),size18=c(18,16,16)) as.clusterizLongData(dn) ### Changing parameters as.cld(dn,i=c("H101","H108","B103"),timeCol=c(2,2,3,3,3,3,4),timeReal=12:18)