Learn R Programming

kml (version 0.9.2)

as.clusterizLongData: ~ Function: as.clusterizLongData (or as.cld) ~

Description

as.clusterizLongData (or as.cld) turns a data.frame into an object of class ClusterizLongData.

Usage

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

Arguments

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 identifier
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
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 traj
...
For compatibility only

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 :

English translation

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

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.

References

Article submited Web site: http://christophe.genolini.free.fr/kml

See Also

Overview: kml-package Classes : ClusterizLongData Methods : clusterizLongData, generateArtificialLongData Plot : plot: overview, plot(ClusterizLongData), plot(Calinski), plotSubGroups(ClusterizLongData), plotAll(ClusterizLongData)

Examples

Run this code
### 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)

Run the code above in your browser using DataLab