make_plate_matrix <- function(fun_value) { m <- matrix(NA_real_, nrow = 8, ncol = 12, dimnames = list(LETTERS[1:8], as.character(1:12))) m["A", ] <- 0.1 set.seed(123) for (r in LETTERS[2:8]) { for (c in 1:12) m[r, as.character(c)] <- fun_value(r, c) } m } write_matrix_csv <- function(mat, path) { utils::write.table(mat, file = path, sep = ",", col.names = FALSE, row.names = FALSE, na = "") } well_ids_8x12 <- function() as.vector(outer(LETTERS[1:8], sprintf("%02d", 1:12), paste0))