gp | R Documentation |
Make a gp object
gp(rows = NULL, cols = NULL, data = NULL, wells = NULL, tidy = FALSE)
rows |
Numeric. The number of rows the plate should have. |
cols |
Numeric. The number of columns the plate should have. |
data |
An optional data.frame of well data the same dimensions as the plate to be described |
wells |
Numeric. The number of wells the plate has. If this is specified, rows and cols must be null - they are inferred from common form factors of plates. |
tidy |
Are the data supplied tidy? |
A gp
object has the following components:
nrow
/ncol
: Number of plate rows/cols. This is static and will not be
changed by adding layers.
well_data
: Somewhat transient data used to define plotting coordinates
for layers. See below for more information.
nrow_sec
/ncols_sec
: The number of rows/cols of the current section.
When creating a plate, that number is the number of rows/cols of the plate
(the plate is the section). Can take on a 'mar' suffix, which specifies the
number including margins (if any)
nrow_sec_par
/ncol_sec_par
: The number of rows/cols of the parent
section. When creating a plate, it has no parent, so defaults to being its
own parent. Can take on a 'mar' suffix. See above.
well_data
consists of many columns. The variable names can be broken down
as follows:
row
/col
: row
is always the y axis, col
is always the x axis. By
convention, plates start at 1, 1 in the top left corner.
sec
: Short for 'section'. A section is a rectangular field of wells.
sec
alone refers to the number of the section itself. sec
combined with
row
or col
(eg row_sec
) refers to the coordinates of a given well
relative to it's section corners, with the top left corner of a given section
always being (1, 1).
par
: Short for 'parent'. These columns are all the data from the previous
layer.
index
: These specify (usually) multiwell strips only defined in one
dimension. Together, index_row
and index_col
form
checkerboard-like patterns, where each intersection is a section.
This is a bit more complicated when wrap = TRUE
, so the simile
does not hold for all cases.
a gp
object
# If you specify wells, rows and columns are derived
# from a standard plate sizes:
gp(wells = 96)
# As such, you cannot use the wells argument
# if you want to create more exotic plates:
try(gp(wells = 102))
# For that, you'll need to specify wells and cols:
gp(rows = 6, cols = 17)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.