Learn R Programming

qcmetrics (version 1.10.2)

QcMetrics-class: The "QcMetrics" class for collections of QC items

Description

Data structure for storing lists of QcMetric items.

Arguments

Objects from the Class

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.

See Also

The QcMetric class for individual QC items.

Examples

Run this code
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)

Run the code above in your browser using DataLab