This function plots clusters over a set of trajectories as joint, coloured bar plots. The clusters are sorted beginning with the most populated one and then in descending order. Selections can be made.
Matrix with clusters. Trajectories in rows, clusters in columns.
clustersNumber
When specified, only this number of clusters is shown.
legendTitle
The title of the legend.
barePlot
Boolean, indicating whether the plot is to be made without any additional information.
...
Additional arguments (ellipsis).
Author(s)
Christian Margreitter
Examples
# see "extdata/clusters_example.txt.gz" for format information
clusters( load_clusters( system.file( "extdata/clusters_example.txt.gz",
package = "MDplot" ) ) )
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(MDplot)
Loading required package: MASS
Loading required package: RColorBrewer
Loading required package: gplots
Attaching package: 'gplots'
The following object is masked from 'package:stats':
lowess
Loading required package: gtools
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MDplot/clusters.Rd_%03d_medium.png", width=480, height=480)
> ### Name: clusters
> ### Title: Cluster bar plot
> ### Aliases: clusters
> ### Keywords: Clusters
>
> ### ** Examples
>
> # see "extdata/clusters_example.txt.gz" for format information
> clusters( load_clusters( system.file( "extdata/clusters_example.txt.gz",
+ package = "MDplot" ) ) )
cluster1 cluster2 cluster3 cluster4 cluster5 cluster6 cluster7 cluster8
1 8539 0 175 0 0 284 0 0
2 3027 5224 0 178 62 3 370 1
3 8926 0 0 0 0 71 0 0
4 7999 0 928 0 0 37 0 0
5 2993 5064 12 390 368 7 0 106
6 8837 0 122 0 0 26 0 0
cluster9 cluster10 cluster11 cluster12 cluster13 cluster14 cluster15
1 0 0 0 0 0 0 0
2 65 3 10 23 10 12 0
3 0 0 2 0 0 0 0
4 0 35 0 0 0 0 0
5 9 0 19 0 11 3 11
6 0 8 6 0 0 0 0
cluster16 cluster17 cluster18 cluster19 cluster20 cluster21 cluster22
1 0 0 0 2 0 0 0
2 4 4 0 0 3 0 1
3 0 0 0 1 0 0 0
4 0 0 0 0 0 0 0
5 0 0 4 0 0 2 0
6 0 0 0 0 0 0 0
cluster23 cluster24 cluster25
1 0 0 0
2 0 0 0
3 0 0 0
4 1 0 0
5 0 1 0
6 0 0 1
>
>
>
>
>
> dev.off()
null device
1
>