Skip to content

Instantly share code, notes, and snippets.

View rmflight's full-sized avatar

Robert M Flight rmflight

View GitHub Profile
    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)
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.

Programming R curriculum

Data structures