See vignettes for further examples

label_plate_rowcol(plate, rowkey = NULL, colkey = NULL, coercefactors = TRUE)

Arguments

plate

tibble (data frame) with variables well_row, well_col, well. This would usually be produced by create_blank_plate(). It is possible to include other information in additional variables.

rowkey

tibble (data frame) describing plate rows, with variables well_row and others.

colkey

tibble (data frame) describing plate columns, with variables well_col and others.

coercefactors

if TRUE, coerce well_row in rowkey and well_col in colkey to factors

Value

tibble (data frame) with variables well_row, well_col, well, and others.

This tibble contains all combinations of well_row and well_col found in the input plate, and all information supplied in rowkey and colkey distributed across every well of the plate. Return plate is ordered by row well_row then column well_col.

Note this ordering may cause a problem if well_col is supplied as a character (1,10,11,...), instead of a factor or integer (1,2,3,...). For this reason, the function by default converts well_row in `rowkey`, and well_col in `colkey`, to factors, taking factor levels from `plate`, and warns the user.

Other tidyqpcr functions require plate plans to contain variables sample_id, target_id, and prep_type, so `label_plate_rowcol` will warn if any of these are missing. This is a warning, not an error, because these variables can be added by users later.

See also

Examples

label_plate_rowcol(plate = create_blank_plate()) # returns blank plate
#> Warning: plate does not contain variable sample_id
#> Warning: plate does not have variable target_id
#> Warning: plate does not have variable prep_type
#> # A tibble: 384 x 3
#>    well  well_row well_col
#>    <chr> <fct>    <fct>   
#>  1 A1    A        1       
#>  2 A2    A        2       
#>  3 A3    A        3       
#>  4 A4    A        4       
#>  5 A5    A        5       
#>  6 A6    A        6       
#>  7 A7    A        7       
#>  8 A8    A        8       
#>  9 A9    A        9       
#> 10 A10   A        10      
#> # … with 374 more rows