plotClusterSenator {tscR}R Documentation

Plot trajectories based on clustering

Description

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

Usage

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


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' )

[Package tscR version 1.2.0 Index]