as.clusterizLongData {kml}R Documentation

~ Function: as.cld.data.frame ~

Description

as.cld.data.frame turn a matrix into an object of class ClusterizLongData.

Usage

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]]),...)

Arguments

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.
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. 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 having suppressed the numbers is chosen.
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. Please note that trajectories that are completely missing (0 present values) must always be excluded.
... For compatibility only

Details

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.

Value

An object of class ClusterizLongData.

Author(s)

Christophe Genolini
PSIGIAM: Paris Sud Innovation Group in Adolescent Mental Health
INSERM U669 / Maison de Solenn / Paris

Responsable : <genolini@u-paris10.fr>

English translation

Raphaël Ricaud
Laboratoire "Sport & Culture" / "Sports & Culture" Laboratory
University of Paris 10 / Nanterre

See Also

as.cld, as.cld.matrix, as.cld.artificialLongData, kml-package

Examples

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

[Package kml version 0.9.0 Index]