Description Usage Arguments Details Value See Also Examples
These as.data.frame
methods create a data frame
from aggregated and discretised values in a manner
distinct from extract
. flatten
converts into a ‘flat’ data frame, including all
measurements in a single column (suitable, e.g., for
lattice).
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 | ## S4 method for signature 'MOPMX'
as.data.frame(x, row.names = NULL,
optional = FALSE, sep = "_", csv.data = TRUE, settings = TRUE,
include = FALSE, ..., stringsAsFactors = default.stringsAsFactors())
## S4 method for signature 'OPM'
as.data.frame(x, row.names = NULL,
optional = FALSE, sep = "_", csv.data = TRUE, settings = TRUE,
include = FALSE, ..., stringsAsFactors = default.stringsAsFactors())
## S4 method for signature 'OPMA'
as.data.frame(x, row.names = NULL,
optional = FALSE, sep = "_", csv.data = TRUE, settings = TRUE,
include = FALSE, ..., stringsAsFactors = default.stringsAsFactors())
## S4 method for signature 'OPMD'
as.data.frame(x, row.names = NULL,
optional = FALSE, sep = "_", csv.data = TRUE, settings = TRUE,
include = FALSE, ..., stringsAsFactors = default.stringsAsFactors())
## S4 method for signature 'OPMS'
as.data.frame(x, row.names = NULL,
optional = FALSE, sep = "_", csv.data = TRUE, settings = TRUE,
include = FALSE, ..., stringsAsFactors = default.stringsAsFactors())
## S4 method for signature 'kegg_compound'
as.data.frame(x, row.names = NULL,
optional = TRUE, ..., stringsAsFactors = FALSE)
## S4 method for signature 'kegg_compounds'
as.data.frame(x, row.names = NULL,
optional = TRUE, ..., stringsAsFactors = FALSE)
## S4 method for signature 'MOPMX'
flatten(object, include = NULL, fixed = list(),
factors = FALSE, ...)
## S4 method for signature 'OPM'
flatten(object, include = NULL, fixed = list(),
factors = TRUE, exact = TRUE, strict = TRUE, full = TRUE,
numbers = FALSE, ...)
## S4 method for signature 'OPMS'
flatten(object, include = NULL, fixed = list(), ...)
|
x |
Object of class There are |
row.names |
Optional vector for use as row names of the resulting data frame. Here, it is not recommended to try to set row names explicitly. |
optional |
Logical scalar passed to the list and
matrix methods of |
sep |
Character scalar used as word separator in
column names. Set this to |
csv.data |
Logical scalar indicating whether the
|
settings |
Logical scalar indicating whether the
|
stringsAsFactors |
Logical scalar passed to the list
and matrix methods of |
object |
|
include |
For For |
fixed |
|
factors |
Logical scalar. See the
|
exact |
Logical scalar. Passed to
|
strict |
Logical scalar. Passed to
|
full |
Logical scalar. Replace well coordinates by full names? |
numbers |
Logical scalar. Use numbers instead of well names? This is not recommended for must usages. |
... |
Optional other arguments passed to
|
The as.data.frame
methods for OPMX
objects are mainly intended to produce objects that can
easily be written to CSV files, for instance
using write.table
from the utils package.
There are no opm methods other than
batch_opm
(which can write such files) that
make use of the created kind of objects. In particular,
they cannot be input again into opm.
The following entries are contained in the generated data frame:
Optionally the csv_data
entries that
identify the plate.
The names of the wells. Always included.
For OPMA
objects (and
OPMS
objects that contain them as well as
MOPMX
objects that contain such
OPMA
or OPMS
objects), always
the aggregated data (curve parameters), one column for
each point estimate, upper and lower confidence interval
of each parameter.
For OPMA
objects (and
OPMS
objects that contain them as well as
MOPMX
objects that contain such
OPMA
or OPMS
objects),
optionally the used aggregation settings, one column per
entry, except for the ‘options’ entry (which is
not a scalar). The column names are prefixed with
"Aggr"
followed by sep
. If sep
is
empty, opm_opt("comb.key.join")
is used.
For OPMD
objects (and
OPMS
objects that contain them as well as
MOPMX
objects that contain such
OPMD
or OPMS
objects), always
one column with the discretised data.
For OPMD
objects (and
OPMS
objects that contain them as well as
MOPMX
objects that contain such
OPMD
or OPMS
objects),
optionally the used discretisation settings, one column
per entry, except for the ‘options’ entry (which
is not a scalar). The column names are prefixed with
"Disc"
followed by sep
. If sep
is
empty, opm_opt("comb.key.join")
is used.
The limits of using CSV as output format already show up in this list, and in general we recommend to generate YAML or JSON output instead.
For the as.data.frame
methods of the other
classes, see substrate_info
.
In the data frame returned by flatten
, column
names are unchecked (not converted to variable names).
The three last columns are coding for time, well and
value, with the exact spelling of the column names given
by param_names
.
The OPMS
method yields an additional column
for the plate, the exact spelling of its name also being
available via param_names
. This column
contains the position of each plate within object
.
The MOPMX
method yields a another
additional column for the plate type. There is currently
no safeguard against having several OPMX
objects of the same plate type within a
MOPMX
object.
The as.data.frame
methods create a data frame with
one row for each combination of well and plate.
The flatten
methods create a data frame with one
row for each combination of time point, well and plate.
utils::write.table stats::reshape pkgutils::flatten
Other conversion-functions: extract
,
extract_columns
, merge
,
oapply
, opmx
,
plates
, rep
,
rev
, sort
,
split
, to_yaml
,
unique
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## OPMD method of as.data.frame()
summary(x <- as.data.frame(vaas_1))
stopifnot(is.data.frame(x), nrow(x) == 96)
## OPMS method of as.data.frame()
summary(x <- as.data.frame(vaas_4[, , 1:10]))
stopifnot(is.data.frame(x), nrow(x) == 10 * 4)
## OPM method of flatten()
# distinct numbers of columns due to distinct selection settings
head(x <- flatten(vaas_1))
stopifnot(is.data.frame(x), identical(dim(x), c(36864L, 3L)))
head(x <- flatten(vaas_1, fixed = "TEST", include = "Strain"))
stopifnot(is.data.frame(x), identical(dim(x), c(36864L, 5L)))
## OPMS method of flatten()
# distinct numbers of columns due to distinct selection settings
head(x <- flatten(vaas_4[, , 1:10]))
stopifnot(is.data.frame(x), identical(dim(x), c(15360L, 4L)))
head(x <- flatten(vaas_4[, , 1:10], fixed = "TEST", include = ~ Strain))
stopifnot(is.data.frame(x), identical(dim(x), c(15360L, 6L)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.