A set of simple functions for working with plate-based data.
library(simplePlates)
"omg this is the best thing ever i love simplePlates" - Somayra, 2020
devtools::install_github("bradyajohnston/simpleplates")
make_plate()
For quickly generating sample and concentration data for a plate, to later match with observed data. The rows can be either letters or a numeric verctor (numbers must be > 0 and < 26).
make_plate( rows = LETTERS[1:3], cols = 1:3, sample = "foo" ) make_plate( rows = 1:3, cols = 1:3, sample = "foo" ) make_plate( rows = 1:3, cols = 1:3, sample = c("sampleA", "sampleB", "sampleC") ) make_plate( rows = 1:3, cols = 1:3, sample = rep(c("sampleA", "sampleB", "sampleC"), each = 3) )
make_plate()
can also take concentration information, as well as perform dilution series`.
make_plate( rows = 1:3, cols = 1:3, sample = c("sampleA", "sampleB", "sampleC"), conc = 500, dil = 0.5, direction = "vertical" ) make_plate( rows = 1:3, cols = 1:3, sample = rep(c("sampleA", "sampleB", "sampleC"), each = 3), conc = 500, dil = 0.5, direction = "horizontal" )
plate_map()
Cretes a visual representation of a plate's contents.
df1 <- make_plate( rows = 1:8, cols = 1:12, sample = rep(c("sampleA", "sampleB", "sampleC"), each = 4), conc = 500, dil = 0.5, direction = "vertical" ) library(ggplot2) plate_map(df1, cols = "cols", rows = "rows", colour = "sample") + theme(legend.position = "bottom")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.