Description Usage Arguments Value Note See Also Examples
Return the measurements, optionally only from selected wells and with or without the time points, or only the time points. Alternatively, selected measurements of interest from a larger matrix of mode ‘character’.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ## S4 method for signature 'MOPMX'
hours(object, ...)
## S4 method for signature 'OPM'
hours(object,
what = c("max", "all", "size", "summary", "interval", "minmax"))
## S4 method for signature 'OPMS'
hours(object, ...)
## S4 method for signature 'MOPMX'
measurements(object, ...)
## S4 method for signature 'OPM'
measurements(object, i, logt0 = FALSE)
## S4 method for signature 'OPMS'
measurements(object, ...)
## S4 method for signature 'matrix'
measurements(object, wanted = NULL,
transposed = TRUE, col.names = 1L, row.names = NULL, check.names = TRUE,
stringsAsFactors = default.stringsAsFactors())
## S4 method for signature 'MOPMX'
well(object, ...)
## S4 method for signature 'OPM'
well(object, i, drop = TRUE, use.names = TRUE)
## S4 method for signature 'OPMS'
well(object, ...)
|
object |
|
i |
Optional character or numeric vector with
name(s) or position(s) of well(s). Wells are originally
named ‘A01’ to ‘H12’ but might have been
subset beforehand. |
logt0 |
Logical scalar. Treat the data like cell
counts and calculate |
drop |
Logical scalar. If only a single well was selected, simplify it to a vector? |
use.names |
Logical scalar indicating whether the time points should be used as names for the measurements. |
what |
Character scalar determining the output mode as follows:
|
wanted |
Empty or character vector used by the matrix method for selecting columns. If of length one, used as a regular expression in that context. If empty, the methods selects the columns that can be interpreted as numeric throughout. |
transposed |
Logical scalar. For the matrix method, indicating whether the matrix shall be transposed prior to further processing. |
col.names |
Used by the matrix method. Empty or scalar indicating the position of the column names within the matrix (which is assumed to not yet contain proper column names). |
row.names |
Used by the matrix method. Empty or scalar indicating the position of the row names within the matrix (which is assumed to not yet contain proper row names). |
check.names |
Logical scalar. Used by the matrix
method to indicate whether row and column names should be
treated with |
stringsAsFactors |
Logical scalar used by the matrix method. |
... |
Optional arguments passed between the methods. |
measurements
returns a numeric matrix with column
names indicating the well coordinate and a first column
containing the time points. The other columns contain the
values from each well. There is one row per time point.
Column names are appropriately set, but not translated
(as, e.g., to substrate names). It is possible to select
wells, but the time points are always included as first
column (in contrast to well
). The i
argument refers only to the remaining matrix.
The matrix measurements returns a data frame containing the selected rows and columns only. This is intended as a helper method for inputting irregular data.
Do not confuse well
with wells
.
well
yields a numeric matrix or vector, depending
on i
and drop
. It will always ignore the
time points as values, in contrast to
measurements
. But depending on use.names
they would be inserted as names.
The return value of hours
is dependent on the
what
argument; see there.
For quickly obtaining an overview of the running times in
a MOPMX
object see extract
and heat_map
.
Other getter-functions: aggr_settings
,
aggregated
, anyDuplicated
,
anyNA
, contains
,
csv_data
, dim
,
disc_settings
, discretized
,
duplicated
, has_aggr
,
has_disc
, max
,
minmax
, seq
,
subset
, thin_out
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | # 'OPM' methods
head(x <- measurements(vaas_1))[, 1:5] # => numeric matrix
stopifnot(is.matrix(x), is.numeric(x))
stopifnot(dim(x) == c(384, 97))
head(x <- measurements(vaas_1, "B03"))
stopifnot(is.matrix(x), is.numeric(x), dim(x) == c(384, 2))
head(y <- measurements(vaas_1, ~ B03)) # => same result with formula
stopifnot(identical(y, x))
head(x <- well(vaas_1, "B04")) # => numeric vector
stopifnot(is.numeric(x), length(x) == 384)
head(x <- well(vaas_1, c("B08", "C07"))) # => numeric matrix
stopifnot(is.matrix(x), dim(x) == c(384, 2))
# selecting adjacent wells is easer when using a formula
head(x <- well(vaas_1, c("B12", "C01", "C02")))
stopifnot(is.matrix(x), dim(x) == c(384, 3))
head(y <- well(vaas_1, ~ B12:C02)) # => same result
stopifnot(identical(x, y))
(x <- hours(vaas_1)) # the default is 'max'
stopifnot(identical(x, 95.75))
(x <- hours(vaas_1, "minmax"))
stopifnot(identical(x, 95.75))
(x <- hours(vaas_1, "summary"))
stopifnot(is.table(x))
(x <- hours(vaas_1, "interval"))
stopifnot(identical(x, 0.25))
(x <- hours(vaas_1, "size"))
stopifnot(identical(x, 384L))
# 'OPMS' methods
summary(x <- measurements(vaas_4)) # => list of numeric matrices
stopifnot(is.list(x), length(x) == length(vaas_4))
stopifnot(sapply(x, is.matrix), sapply(x, is.numeric))
head(x <- well(vaas_4, "B04"))[, 1:5] # => numeric matrix
stopifnot(is.matrix(x), dim(x) == c(4, 384))
head(y <- well(vaas_4, ~ B04))[, 1:5] # using a formula
stopifnot(identical(x, y)) # => same result
(x <- hours(vaas_4)) # all with the same overall running time
stopifnot(length(x) == 4, x == 95.75)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.