Learn R Programming

kml (version 2.1.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),trajMinSize=1,
#   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),trajMinSize=1,
#   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

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.clusterizLongData(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