plotClusterSenator: Plot trajectories based on clustering

Description Usage Arguments Details Value Examples

View source: R/plotClusterSenator.R

Description

Draw trajectories and are colored based on their clusters with imputesenator object

Usage

1
plotClusterSenator(x, ncluster)

Arguments

x

imputesenator class object from imputeSenatorToData function.

ncluster

When nclust = 'all', plots all trajectories and cluster together in a single plot. If it's an integer, it draws only trajectories that belong to that cluster. Finally, if it is a numeric vector, it draws trajectories corresponding to each cluster within a subplot.

Details

It draws trajectories where x axis is time data and y axis trayectory values.

Value

Plot clustered trayectories

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 )
endCluster <- imputeSenatorToData( senators, sClust )
plotClusterSenator( endCluster, 'all' )

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