Learn R Programming

longitudinalData (version 2.0)

longDataFrom3d: ~ Function: longDataFrom3d ~

Description

Extract a single variable-trajectory from an object LongData that contain some joint-trajectories.

Usage

longDataFrom3d(xLongData3d,variable)

Arguments

xLongData3d
[LongData3d]: structure containning some joint-trajectories.
variable
[character]: either the name of one of the variable of xLongData3d, or its number.

Value

  • An object of class LongData.

Author

Christophe Genolini 1. UMR U1027, INSERM, Universit� Paul Sabatier / Toulouse III / France 2. CeRSME, EA 2931, UFR STAPS, Universit� de Paris Ouest-Nanterre-La D�fense / Nanterre / France

Details

Extract a single variable-trajectory from an object LongData3d that contain some join-trajectories.

References

[1] C. Genolini and B. Falissard "KmL: k-means for longitudinal data" Computational Statistics, vol 25(2), pp 317-328, 2010 [2] C. Genolini and B. Falissard "KmL: A package to cluster longitudinal data" Computer Methods and Programs in Biomedicine, 104, pp e112-121, 2011

See Also

LongData

Examples

Run this code
### Creation of joint-trajectories
mat <- array(c(1,NA,3,2,3,6,1,8,10,1,NA,1,2,NA,3,2,3,2),dim=c(3,3,2))
(ldJoint <- longData3d(mat,varNames=c("Hyp","Som")))

### Extraction of the first variable-trajectory
(ldHyp <- longDataFrom3d(ldJoint,variable="Hyp"))

### Extraction of the second variable-trajectory
(ldSom <- longDataFrom3d(ldJoint,variable="Som"))

### Extraction of the second variable-trajectory, using number
(ldSom <- longDataFrom3d(ldJoint,variable=2))

Run the code above in your browser using DataLab