QcMetrics-class | R Documentation |
"QcMetrics"
class for collections of QC itemsData structure for storing lists of QcMetric
items.
Objects can be created using the constructor QcMetrics(...)
, where
slots are assigned individually. See example below.
In a standardised quality control pipeline, the QcMetrics
and
QcMetric
object are not generated manually. Their creation is
delegated to a wrapper function that reads a specific type of files,
parses the data, produces the individual QcMetric
instances
and, eventually, the QcMetric
object. See the package vignette
for details and examples.
metadata
:Object of class
QcMetadata
storing the
metadata of the object
. This list would typically contain
the input file the data was read from, the date the object was
generated, ... or fully fledged minimum information
descriptions (see MIAxE
), when available.
qcdata
:Object of class "list"
storing all the
individual QcMetric
instances.
signature(x = "QcMetrics")
: subsets x
as a
new QcMetrics
instance.
signature(x = "QcMetrics")
: extracts a single
QcMetric
instance.
signature(x = "QcMetrics")
: returns the number
of QcMetric
instances populate x
.
signature(x = "QcMetrics")
: return the
object
's metadata list. Also available as mdata
.
signature(x = "QcMetrics", value =
"list")
: sets the objects metadata. Also available as
mdata
.
signature(x = "QcMetric", value =
"QcMetadata")
: sets the objects metadata. Also available as
mdata
.
signature(object = "QcMetrics")
: returns a
character
vector of length length(object)
with the names
of the QcMetric
instances.
signature(object = "QcMetrics", x = "missing")
:
returns a list of all QcMetric
instances.
signature(object = "QcMetrics", value = "list")
:
sets the qcdata
of object.
signature(object = "QcMetrics")
: prints a short
textual description of object
.
signature(object = "QcMetrics")
: returns a
vector of quality statuses (logicals
).
signature(object = "QcMetrics", value =
"logical")
: sets the quality statuses. Length of value
and object
must be identical.
signature(object = "QcMetrics", "data.frame")
:
coerces object
as a length(object)
by 2 data frame
with the respective QcMetric
instances names and statuses.
signature(object = "QcMetrics")
: ...
Laurent Gatto
The QcMetric
class for individual QC items.
example(QcMetric)
show(qc)
qc2 <- QcMetric(name = "My other metric", status = TRUE)
qcdata(qc2, "x") <- rnorm(100)
qcdata(qc2, "k") <- rep(LETTERS[1:2], 50)
plot(qc2) <- function(object, ...) {
require("lattice")
d <- data.frame(x = qcdata(object, "x"),
k = qcdata(object, "k"))
bwplot(x ~ k, data = d)
}
qcm <- QcMetrics(qcdata = list(qc, qc2))
qcm
qcm[1] ## a QcMetrics instance
qcm[[1]] ## a single QcMetric
metadata(qcm)
metadata(qcm) <- QcMetadata(list(name = "Prof. Who",
lab = "Cabin University"))
## or, shorter but equivalent
metadata(qcm) <- list(name = "Prof. Who",
lab = "Cabin University")
metadata(qcm) ## or mdata(qcm)
## update metadata
metadata(qcm) <- list(lab = "Big lab", ## updated
uni = "Cabin University") ## added
mdata(qcm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.