Description Usage Arguments Details Value See Also Examples
Information about the plate as originally read from the
input CSV file (see read_opm
and
read_single_opm
for reading such files).
1 2 3 4 5 6 7 8 |
object |
|
keys |
Character vector (or other objects usable as
vector index). An optional sub-selection. If empty (the
default), all CSV data are returned. By default
it is an error to select non-existing items. Ignored
unless |
strict |
Logical scalar indicating whether or not it
is an error if |
what |
Character scalar specifying a subset of the
data. If ‘select’, use |
normalize |
Logical or integer scalar indicating
whether plate position and setup time entries (if
selected) should be normalised. This should always work
for the plate positions, but for the setup times it
depends on the values for the For |
... |
Optional arguments passed between the methods. |
It is easy to copy the CSV data to the
metadata
; see the examples section. Editing
of the CSV data has deliberately not been
implemented into opm, but the
metadata
can be modified using a plethora
of methods, even manually with edit
.
For the OPM
method, a named character
vector (unnamed character scalar in the case of
filename
, setup_time
and filename
and if what
is not ‘select’). For the other
methods either a named character vector (if the selection
yields a single entry) or a character matrix with one row
per plate. Missing entries in one of the plates yield
NA
in the output.
base::strptime
Other getter-functions: aggr_settings
,
aggregated
, anyDuplicated
,
anyNA
, contains
,
dim
, disc_settings
,
discretized
, duplicated
,
has_aggr
, has_disc
,
hours
, max
,
measurements
, minmax
,
seq
, subset
,
thin_out
, well
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' method
(x <- csv_data(vaas_1, "Setup Time"))
stopifnot(identical(x, c(`Setup Time` = "8/30/2010 1:53:08 PM")))
# compare this to 'what = "setup_time"'; here, names are kept
(y <- csv_data(vaas_1, "Setup Time", normalize = TRUE))
stopifnot(!is.na(y), y != x, names(y) == names(x))
(x <- csv_data(vaas_1, what = "filename")) # one file name (of course)
stopifnot(is.character(x), length(x) == 1L)
(x <- csv_data(vaas_1, what = "position")) # single position (of course)
(y <- csv_data(vaas_1, what = "position", normalize = TRUE))
stopifnot(x == " 7-B", y == "07-B") # four characters when normalised
(x <- csv_data(vaas_1, what = "setup_time")) # single setup time (of course)
(y <- csv_data(vaas_1, what = "setup_time", normalize = TRUE))
stopifnot(length(x) == 1, x != y) # converted to canonical data/time format
# WARNING: It is unlikely that all OmniLog output has the setup-time format
# defined by default in opm_opt("time.fmt")
## 'OPMS' method
(x <- csv_data(vaas_4, "Setup Time")) # one setup time per plate
stopifnot(is.character(x), length(x) == 4)
(x <- csv_data(vaas_4, what = "filename")) # one file name per plate
stopifnot(is.character(x), length(x) == 4L)
(x <- csv_data(vaas_4, what = "position")) # one position per plate
stopifnot(is.character(x), length(x) == length(vaas_4))
(x <- csv_data(vaas_4, what = "setup_time")) # one setup time per plate
(y <- csv_data(vaas_4, what = "setup_time", normalize = TRUE))
stopifnot(length(x) == 4, x != y) # converted to canonical data/time format
# see the warning above
## Useful application: copying selected CSV data to the metadata
x <- vaas_4
# this appends the CSV data after conversion to a suitable data frame
metadata(x, -1) <- to_metadata(csv_data(x, what = "other"))
to_metadata(x)
stopifnot(sapply(metadata(x), length) > sapply(metadata(vaas_4), length))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.