Description Usage Arguments Details Value See Also Examples
Get the dimensions of the measurements of an
OPM
object, or get the dimensions of an
OPMS
object, or the number of plates stored
in an OPMX
object, or the indexes of all
these plates.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
x |
|
... |
|
Note that dim
cannot be used to determine the
correspondence of the time points between all plates as
it reports only the time points of the first plate.
Instead the OPMS
method of
hours
must be used.
seq
yields the indexes of all plates contained in
an OPMS
object. This is mainly useful for
looping over such objects. See [
for a
loop-construct usage example, and note that
oapply
is also available.
For the OPM
method of dim
, a
two-element numeric vector (number of time points and
number of wells). For the OPMS
method, a
numeric vector with (i) the number of contained
OPM
objects, and (ii) and (iii) the
dimensions of the first plate. length
returns an
integer scalar. This seq
method yields an integer
vector (starting with 1 and at least of length 2).
base::dim base::length base::seq
Other getter-functions: aggr_settings
,
aggregated
, anyDuplicated
,
anyNA
, contains
,
csv_data
, disc_settings
,
discretized
, duplicated
,
has_aggr
, has_disc
,
hours
, max
,
measurements
, minmax
,
subset
, thin_out
,
well
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # OPM methods
(x <- dim(vaas_1))
stopifnot(identical(x, c(384L, 96L)))
(x <- length(vaas_1))
stopifnot(identical(x, 1L)) # 1 plate contained
(x <- try(seq(vaas_1), silent = TRUE)) # deliberately yields an error
stopifnot(inherits(x, "try-error"))
# OPMS methods
(x <- dim(vaas_4)) # 2nd value needs not be correct for all plates
stopifnot(identical(x, c(4L, 384L, 96L)))
(x <- length(vaas_4))
stopifnot(identical(x, 4L)) # 4 plates contained
(x <- seq(vaas_4))
stopifnot(identical(x, 1:4)) # indexes for 4 plates
(y <- seq(vaas_4, letters, LETTERS)) # other arguments are ignored
stopifnot(identical(x, y))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.