Creates a BatchContainer from a table (data.frame /tibble::tibble ) containing sample and location information.
batch_container_from_table(tab, location_cols)
tab
: A table with location and sample information. Table rows with all NA
s in sample information columns are treated as empty locations.location_cols
: Names of columns containing information about locations.A BatchContainer assigned samples.
tab <- data.frame( row = rep(1:3, each = 3), column = rep(1:3, 3), sample_id = c(1, 2, 3, NA, 5, 6, 7, NA, 9) ) bc <- batch_container_from_table(tab, location_cols = c("row", "column"))
Useful links