if (!requireNamespace("piececor")) remotes::install_github('brshallo/piececor')
## Loading required namespace: piececor
library(dplyr)
set.seed(1234)
x <- seq(.01, 3*pi, pi/100)
y <- sin(x) + rnorm(length(x), sd = 0.25)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
m = matrix(rnorm(100), 10) | |
rownames(m) = paste0("row", 1:10) | |
colnames(m) = paste0("column", 1:10) | |
ht = draw(Heatmap(m, name = "mat")) | |
highlight_row = function(which, padding = unit(1, "mm"), gp = gpar()) { | |
row_order = row_order(ht) | |
i = which(row_order == which) | |
nr = length(row_order) |
Notes:
-
I've tried to break up in to separate pieces, but it's not always possible: e.g. knowledge of data structures and subsetting are tidy intertwined.
-
Level of Bloom's taxonomy listed in square brackets, e.g. http://bit.ly/15gqPEx. Few categories currently assess components higher in the taxonomy.