R/batch_container_dimension.R
BatchContainerDimension.Rd
R6 Class representing a batch container dimension.
R6 Class representing a batch container dimension.
name
dimension name.
values
vector of dimension values.
size
Returns size of a dimension.
short_info
Returns a string summarizing the dimension. E.g., "mydim<size=10>".
new()
Create a new BatchContainerDimension object.
This is usually used implicitly via BatchContainer$new()
.
BatchContainerDimension$new(name, size = NULL, values = NULL)
name
Dimension name, a character string. Requiered.
size
Dimension size. Setting this implies that dimension values are 1:size
.
values
Explicit list of dimension values. Could be numeric, character or factor.
It is required to provide dimension namd and either size of values.
plate_dimension <- BatchContainerDimension$new("plate", size=3)
row_dimension <- BatchContainerDimension$new("row", values = letters[1:3])
column_dimension <- BatchContainerDimension$new("column", values = 1:3)
bc <- BatchContainer$new(
dimensions = list(plate_dimension, row_dimension, column_dimension),
exclude = data.frame(plate = 1, row = "a", column = c(1, 3), stringsAsFactors = FALSE)
)
bc
## ------------------------------------------------
## Method `BatchContainerDimension$new`
## ------------------------------------------------
plate_dimension <- BatchContainerDimension$new("plate", size=3)
row_dimension <- BatchContainerDimension$new("row", values = letters[1:3])
column_dimension <- BatchContainerDimension$new("column", values = 1:3)
bc <- BatchContainer$new(
dimensions = list(plate_dimension, row_dimension, column_dimension),
exclude = data.frame(plate = 1, row = "a", column = c(1, 3), stringsAsFactors = FALSE)
)
bc
#> Batch container with 25 locations.
#> Dimensions: plate, row, column