Learn R Programming

kml3d (version 0.7)

restaureRealData: ~ Function: restaureRealData ~

Description

This function revert the effect of scale by restauring the initial values of trajectories.

Usage

restaureRealData(object)

Arguments

object
[LongData]: Object containnig trajectories to restaure.

Value

  • None. (this function change internaly the field of an object, it does not return any values.)

Author(s)

Christophe Genolini INSERM U669 / PSIGIAM: Paris Sud Innovation Group in Adolescent Mental Health Modal'X / Universite Paris Ouest-Nanterre- La Defense Contact author : genolini@u-paris10.fr

Details

This function revert the effect of scale by restauring the initial values of trajectories.

References

Article "KmL: K-means for Longitudinal Data", in Computational Statistics, Volume 25, Issue 2 (2010), Page 317. Web site: http://christophe.genolini.free.fr/kml

Examples

Run this code
##################
### 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 <- as.longData(array(cbind(outer(id2,time,f),outer(id2,time,g))+rnorm(12*8*2,0,3),dim=c(12,8,2)))

### Scaling
plot(ld1)
scale(ld1)

### Only the y-axe change...
plot(ld1)

### Back to the first version of the data
restaureRealData(ld1)
plot(ld1)

Run the code above in your browser using DataLab