| validate_BGF | R Documentation |
A set of two functions, that allow to validate and re-establish data integrity of a BGF.
validate_BGF(x)
update_BGF(x, delete_missing_BGD = FALSE)
x |
a |
delete_missing_BGD |
|
The function validate_BGF can be used to check whether an object is a BGF or not.
It will raise an error if an object does not fulfill the criteria of a BGF.
The function update_BGF checks and updates several parameters, so that the internal logic of a BGF is consistent.
First of all, it checks if all all fermentations in the metaData-layer occur in the BioGasData-layer of a BGF and vice versa.
It than adds a row to the metaData-layer, if it detects any fermentation in the BioGasData-layer, that is not yet represented in the metaDatalayer.
In the opposite case, a fermentation has an entry in the metaData but not in the BioGasData-layer, the user can decide whether this fermentation should be removed from the metaData-layer or not.
The function will also remove rows that have NAin the 'reactor' column from the BioGasData-layer, sort observations in that layer by 'reactor' and 'time' columns and finally generates new valid row names representing the new row number of an observation in the reordered BioGasData-layer.
a BGF
# create an example BGF
myBGF <- new_BGF("myBGF",52,2,LETTERS[1:15],"A","manuel")
# check if 'myBGF' fulfills the criteria of being a BGF
validate_BGF(myBGF)
# print myBGF
myBGF
# updating the BGF will remove observations from `BioGasData`-layer
myBGF <- update_BGF(myBGF)
# print myBGF again
myBGF
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.