Install required package

if (!require("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("yeastCC")

New functions this week: heatmap

x <- matrix(rnorm(100), nrow = 5)
dim(x)
[1]  5 20

New functions this week: heatmap

heatmap(x)

New functions this week: heatmap

Remove dendogram

heatmap(x, Colv = NA)

New functions this week: dist

Returns pairwise distance matrix between rows of a data matrix

dist(x)
         1        2        3        4
2 5.728357                           
3 7.435952 7.348611                  
4 6.681600 6.464734 8.268792         
5 5.337119 6.253327 7.095763 5.704023

New functions this week: hclust

Clusters using a distance matrix

hclust(dist(x))
Call:
hclust(d = dist(x))

Cluster method   : complete 
Distance         : euclidean 
Number of objects: 5 

New functions this week: hclust

Clusters using a distance matrix

plot(hclust(dist(x)))

New functions this week: heatmap

heatmap(x, Colv = NA)

New functions this week: cutree

Cuts a tree, e.g., as resulting from hclust, into the desired number(s) of groups

cutree(tree, no. of clusters)

New functions this week: cutree

tree <- hclust(dist(x))
cutree(tree,2)
[1] 1 1 2 1 1

New functions this week: cutree

tree <- hclust(dist(x))
cutree(tree,5)
[1] 1 2 3 4 5

New functions this week:

  • heatmap
  • dist
  • hclust
  • cutree
  • pbinom