plotClusterSenator {tscR} | R Documentation |
Draw trajectories and are colored based on their clusters with imputesenator object
plotClusterSenator(x, ncluster)
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. |
It draws trajectories where x axis is time data and y axis trayectory values.
Plot clustered trayectories
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' )