View source: R/listPartition.r
| regroup | R Documentation |
Remove duplicate Partition present in a
ListPartition (or, by inheritance, in
ClusterLongData and ClusterLongData3d objects.
regroup(object)
object |
|
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.
None (this function change internaly the field of an object, it does not return any values.)
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
[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
### 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.