FoodVirusData: An S4 class for representation of foodvirus-data

Description Usage Arguments Value References Examples

View source: R/FoodVirusData-class.R

Description

The FoodVirusData-class stores verification and validation data, which are used as input to the foodvirus Shiny application. A FoodVirusData-object has a data-frame structure and contains two numeric variables: dilution and obtained.

The class extends the S4Vectors::DataFrame class (Pages et al., 2021), without any additional slots.

Usage

1

Arguments

...

A data frame or list to be converted into a FoodVirusData-object.

Value

A FoodVirusData-object if validation succeeds, an error message otherwise.

References

Pages, H., Lawrence, M., and Aboyoun, R. (2021). S4Vectors: Foundation of vector-like and list-like containers in Bioconductor. R package version 0.30.0.

Examples

1
2
3
4
5
6
7
8
## Constructor
data("oyster")
x <- as.data.frame(oyster)
FoodVirusData(x)

## Coercion to a traditional data-frame
as.data.frame(x)
as(x, "data.frame")

sofpn/foodvirus documentation built on Dec. 23, 2021, 3:31 a.m.