Learn R Programming

platetools (version 0.1.7)

set_block: 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)

Value

Returns the ‘plate’ table, where the values for the wells indicated in the blocks have been updated.

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.

Author

Charles Plessy

See Also

num_to_well

Examples

Run this code
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)

if (FALSE) {
# Chained updates with magrittr
p %<>%
  setBlock("A01~C04", "dNTP", 0.5) %>%
  setBlock("A01~C04", "Mg",   3.0)
}

Run the code above in your browser using DataLab