restoreRealData {longitudinalData} | R Documentation |
~ Function: restoreRealData ~
Description
This function revert the effect of scale
by restauring
the initial values of trajectories.
Usage
restoreRealData(object)
Arguments
object |
|
Details
This function revert the effect of scale
by restauring
the initial values of trajectories.
Value
None: this function change internaly the field of an object, it does not return any values.)
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
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
Examples
##################
### Building LongData
time=c(1,2,3,4,8,12,16,20)
id2=1:12
f <- function(id,t)((id-1)%%3-1) * t
g <- function(id,t)(id%%2+1)*t
ld1 <- longData3d(array(cbind(outer(id2,time,f),outer(id2,time,g))+rnorm(12*8*2,0,1),dim=c(12,8,2)))
plotTrajMeans3d(ld1)
##################
### Scaling by 'mean' and 'standard deviation'
scale(ld1,scale=c(-1,-1))
plotTrajMeans3d(ld1)
##################
### Back to the first version of the data
restoreRealData(ld1)
plotTrajMeans3d(ld1)