set_block {platetools} | R Documentation |
Set values in rectangular areas of a plate
Description
Updates a table representing a multiwell plate, by setting a given value for all wells in a block or a list of blocks defined by the well coordinates of their upper-left and bottom-right corners.
Usage
set_block(plate, block, what, value)
Arguments
plate |
A table representing a multiwell plate, with one column named “well” representing the well identifiers. |
block |
Coordinates of a rectangular block (such as “A01~B02”), or a vector of coordinates. |
what |
A column name in the table. |
value |
The value to set. |
Value
Returns the ‘plate
’ table, where the values for
the wells indicated in the blocks have been updated.
Author(s)
Charles Plessy
See Also
Examples
p <- data.frame(well = num_to_well(1:96))
head(p)
p <- set_block(p, c("A01~B02", "A05~D05"), "dNTP", 0.25)
p <- set_block(p, "A03", "dNTP", 0.50)
head(p)
# Be careful with the column names
p <- set_block(p, "A01~H12", "Mg2+", 3.0)
head(p)
## Not run:
# Chained updates with magrittr
p %<>%
setBlock("A01~C04", "dNTP", 0.5) %>%
setBlock("A01~C04", "Mg", 3.0)
## End(Not run)
[Package platetools version 0.1.7 Index]