imputeSenatorToData: Impute clusters from senators to data

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/imputeSenatorToData.R

Description

Assign trajetories from the original data to senator clusters.

Usage

1
imputeSenatorToData(senators, clusters)

Arguments

senators

List object obtained from imputeSenator function

clusters

Pam object obtained from getClusters or combineCluster.

Details

When it's computed a clustering over senators, it's necessary to assign those cluster to original data. To do this, it's known which senator each original trajectory belong to, therefore the final cluster of each senator is identified and the trajectories of that senator are assigned to its definitive cluster.

Value

Object of imputeSenator-class.

Author(s)

Fernando Pérez-Sanz (fernando.perez8@um.es)

Miriam Riquelme-Pérez (miriam.riquelmep@gmail.com)

See Also

plotClusterSenator, imputeSenators, getClusters, imputeSenator-class.

Examples

1
2
3
4
5
6
7
8
data( tscR )
data <- tscR
time <- c( 1, 2, 3 )
senators <- imputeSenators( data, k = 100 )
senatorDist <- slopeDist( senators$senatorData, time )
sClust <- getClusters( senatorDist, k = 5 )
plotCluster( senators$senatorData, sClust, 2 )
endCluster <- imputeSenatorToData( senators, sClust )

tscR documentation built on Nov. 8, 2020, 5:53 p.m.