View source: R/get_functions.R
| get_layer | R Documentation |
A set of functions that can be used to extract various information from a BGF.
get_layer(x, layer, feedback = FALSE)
get_whatever(x, layer, what, feedback = FALSE)
get_MeasurementType(x, feedback = FALSE)
get_ReactorLayout(x, feedback = FALSE)
get_BlankLabel(x, feedback = FALSE)
get_Excluded(x, feedback = FALSE)
get_blanks(x, feedback = FALSE)
get_yield_summary(x, Excluded = FALSE, feedback = TRUE)
x |
a |
layer |
a layer of a |
feedback |
|
what |
a |
Excluded |
|
The functions get_MeasurementType, get_ReactorLayout, get_BlankLabel,get_Excluded and get_blanks are wrapper for get_whatever and extract frequently needed information from a BGF.
The function get_whatever internally calls get_layer to extract any layer from a BGF, and subsequently return only a single list entry or a data.frame column.
The function get_yield_summary returns a data.frame if a yield summary was generated for the BGF via summarize_yield.
get_layer returns a either a data.farme or list
get_whatever returns a either a data.farme column or list entry
get_MeasurementType returns a character
get_ReactorLayout returns a factor
get_BlankLabel returns a factor
get_Excluded returns a character
get_blanks returns a character
get_yield_summary returns a data.frame
# create an example BGF
myBGF<-BGF(LETTERS[1:5],"A","myBGF",52,2,"manuel")
# extract 'ExpParam' layer
ExpParam <-get_layer(myBGF,"ExpParam",TRUE)
# extract 'metaData' layer
metaData <-get_layer(myBGF,"metaData",TRUE)
# extract 'BioGasData' layer
BioGasData <-get_layer(myBGF,"BioGasData",TRUE)
# extract 'name'-attribute
get_whatever(myBGF,"ExpParam","name")
# extract 'MeasurmentType'-attribute
get_MeasurementType(myBGF)
# extract the reactor layout
get_ReactorLayout(myBGF)
# extract the Blank label
get_BlankLabel(myBGF)
# Exclude reactor 1 and 5
myBGF$metaData$Excluded[c(1,5)] <- TRUE
# extract the excluded reactors
get_Excluded(myBGF)
# extract names of blank reactors
get_blanks(myBGF)
# create a second example BGF
myBGF2<-from_AMPTSV2_report(
ReactorLayout = c("2*Blank","Cellulose","3*neg ctrl","3*FR1","3*FR2","3*FR3"),
BlankLabel = "Blank",
name = "myBGF2",
InocToSubRatio = 2,
ProcessTemp = 52,
path = base::system.file("extdata","AMPTSV2.csv",package = "bgfanalyzer"))
# extract yield summary
get_yield_summary(myBGF2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.