setBlock: setBlock

Description Usage Arguments Details Examples

Description

Define properties for a rectangular block in a 96- or 384-well plate.

Usage

1
setBlock(plate, block, what, value)

Arguments

plate

A data frame representing a multiwell plate ("long format").

block

Coordinates of a rectangular block, or a vector of coordinates.

what

A column name in the plate data frame.

value

The value to insert or update with.

Details

Update a data frame 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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
plate <- setBlock(plate, "A01~C04", "dNTP", 0.5)

# Same with magrittr
plate %<>% setBlock("A01~C04", "dNTP", 0.5)

# Chained updates with magrittr
plate %<>%
  setBlock("A01~C04", "dNTP", 0.5) %>%
  setBlock("A01~C04", "Mg",   3.0)

## End(Not run)

p <- data.frame(Well = platetools::num_to_well(1:96))
p$Row <- sub("..$", "", p$Well) %>% factor
p$Col <- sub("^.",  "", p$Well) %>% as.numeric %>% factor

p %>% setBlock("A01~B02", "dNTP", 0.5) %>% head
p %>% setBlock(c("A01~B02", "D01~D02"), "dNTP", 0.5) %>% head

charles-plessy/smallCAGEqc documentation built on May 13, 2019, 3:31 p.m.