set_block | R Documentation |
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.
set_block(plate, block, what, value)
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. |
Returns the ‘plate
’ table, where the values for
the wells indicated in the blocks have been updated.
Charles Plessy
num_to_well
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.