Nmf

Heat Maps

library(dplyr) # Data manipulation & magrittr pipe library(ggplot2) # General plotting library(NMF) # aheatmap() library(gplots) # heatmap.2() library(RColorBrewer) # Brewer palettes set.seed(123) ############################ # 2D histograms # ############################ # simulate data that consiststs of paired observations in two experiments covar_mat <- matrix(c(5, 4, 4, 5), ncol = 2) # Covariance matrix data <- MASS::mvrnorm(n = 10000, mu = c(0, 0), Sigma = covar_mat) %>% #Simulate correlated data rbind(matrix(rnorm(20000, sd = 0.