R6 Class representing a batch container dimension.

R6 Class representing a batch container dimension.

Public fields

name

dimension name.

values

vector of dimension values.

Active bindings

size

Returns size of a dimension.

short_info

Returns a string summarizing the dimension. E.g., "mydim<size=10>".

Methods


Method new()

Create a new BatchContainerDimension object.

This is usually used implicitly via BatchContainer$new().

Usage

BatchContainerDimension$new(name, size = NULL, values = NULL)

Arguments

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.

Examples

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 clone()

The objects of this class are cloneable with this method.

Usage

BatchContainerDimension$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples


## ------------------------------------------------
## 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