This is a function to easily input experimental design elements for later merging with read data
Usage
make_tidydesign(
nrows = NULL,
ncols = NULL,
block_row_names = NULL,
block_col_names = NULL,
wellnames_sep = "",
wellnames_colname = "Well",
wellnames_Excel = TRUE,
lookup_tbl_start = 1,
pattern_split = "",
colnames_first = FALSE,
...
)Arguments
- nrows, ncols
Number of rows and columns in the plate data
- block_row_names, block_col_names
Names of the rows, columns of the plate blockmeasures data
- wellnames_sep
A
stringused when concatenating rownames and column names to create well names- wellnames_colname
Header for newly-created column containing the well names
- wellnames_Excel
If
block_row_namesorblock_col_namesare not specified, should rows and columns be named using Excel-style base-26 lettering for rows and numbering for columns? IfFALSE, rows and columns will be numbered with "R" and "C" prefix.- lookup_tbl_start
Value in the lookup table for the split pattern values that corresponds to the first value in the
vector.Lookup table by default is
c(1,2,...,8,9,A,B,...Y,Z,a,b,...,y,z). If, for example,lookup_tbl_start = "A", then the lookup table will now bec(A,B,...Y,Z,a,b,...,y,z)- pattern_split
character to split pattern elements provided in
...by- colnames_first
In the wellnames created by paste-ing the rownames and column names, should the column names come first
- ...
Each
...argument must be alistwith five elements:a
vectorof the valuesa
vectorof the rows the pattern should be applied toa
vectorof the columns the pattern should be applied toa
stringof the pattern itself, where numbers refer to the indices in the valuesvector0's refer to
NAThis pattern will be split using
pattern_split, which defaults to every charactera
logicalfor whether this pattern should be filled byrow
Details
Note that either nrows or block_row_names must be provided
and that either ncols or block_col_names must be provided
Examples:
my_example <- make_tidydesign(nrows = 8, ncols = 12,
design_element_name = list(c("Value1", "Value2", "Value3"),
rowstart:rowend, colstart:colend,
"111222333000", TRUE)To make it easier to pass arguments, use make_designpattern: