regroup {longitudinalData}R Documentation

~ Function: regroup ~

Description

Remove duplicate Partition present in a ListPartition (or, by inheritance, in ClusterLongData and ClusterLongData3d objects.

Usage

regroup(object)

Arguments

object

[ListPartition]: object that should be simplified.

Details

A clusterizing algorithm can find a Partition several time. It is store several time in object ListPartition(or in ClusterLongData or in ClusterLongData3d), encombering the memory. regroup remove the duplicate Partition. Note that if the ListPartition is not ordered, then regroup sort it unless toOrder=FALSE.

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] Christophe M. Genolini and Bruno Falissard
"KmL: k-means for longitudinal data"
Computational Statistics, vol 25(2), pp 317-328, 2010

[2] Christophe M. Genolini and Bruno Falissard
"KmL: A package to cluster longitudinal data"
Computer Methods and Programs in Biomedicine, 104, pp e112-121, 2011

Examples

### Some data
data(artificialLongData)
myLd <- as.matrix(artificialLongData[,-1])
### Some clustering
part2 <- partition(rep(c("A","B","A","C"),time=50),myLd)
part3 <- partition(rep(c("A","B","C","D"),time=50),myLd)

################
### ListPartition
listPart <- listPartition()

listPart["add"] <- part2
listPart["add"] <- part3
listPart["add"] <- part2
listPart["add"] <- part3

### Some clustering has been found several time
### regroup will suppress the duplicate one
regroup(listPart)
plotCriterion(listPart)

[Package longitudinalData version 2.4.5.1 Index]