The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
Not all rumen gas production experiments are conducted using the ANKOM RF Gas Production System.
rumenGP provides the function as_rumen_gp() for
importing manually collected gas-volume data and pressure-based datasets
into the standard rumen_gp format.
Once imported, the data can be analyzed using the same modeling, visualization, and model-comparison tools available for ANKOM experiments.
The simplest workflow is to import cumulative gas production measurements directly.
manual_volume <- data.frame(
Bottle = c(
1,1,1,
2,2,2
),
Treatment = c(
"Control",
"Control",
"Control",
"Corn",
"Corn",
"Corn"
),
Time = c(
0,4,8,
0,4,8
),
Gas = c(
0,20,40,
0,35,60
)
)Convert the dataset into a rumen_gp object:
gp <- as_rumen_gp(
data = manual_volume,
head_col = "Bottle",
treatment_col = "Treatment",
time_col = "Time",
gas_col = "Gas"
)Inspect the resulting object:
gp
#> Head Bottle Rep Treatment Time_h Gas_mL
#> 1 1 1 1 Control 0 0
#> 2 1 1 1 Control 4 20
#> 3 1 1 1 Control 8 40
#> 4 2 2 1 Corn 0 0
#> 5 2 2 1 Corn 4 35
#> 6 2 2 1 Corn 8 60Verify the class:
At minimum, gas-volume datasets must contain:
Bottle identifier
Incubation time
Gas production
These columns can have any names as long as they are specified through the function arguments.
For example:
rumenGP can also import pressure measurements and convert them to gas volume automatically.
manual_pressure <- data.frame(
Bottle = rep(
1,
10
),
Time = c(
0,
2,
4,
6,
8,
12,
16,
24,
36,
48
),
PSI = c(
0,
0.2,
0.5,
0.8,
1.2,
1.8,
2.5,
3.2,
4.0,
4.5
)
)Convert pressure measurements:
gp_pressure <- as_rumen_gp(
data = manual_pressure,
head_col = "Bottle",
time_col = "Time",
pressure_col = "PSI",
pressure_unit = "psi",
headspace_volume = 60
)Inspect the resulting gas volumes:
Currently supported pressure units are:
psi
kpa
Examples:
or
Pressure measurements require information about headspace volume.
Headspace volume is the gas volume available inside the bottle and is not necessarily the same as the total bottle volume.
Example:
Bottle volume = 125 mL
Liquid volume = 75 mL
Headspace volume = 50 mL
When pressure data are imported:
should represent the headspace volume, not the total bottle capacity.
Supported headspace units:
mL
L
Examples:
Pressure datasets occasionally contain slightly negative readings caused by sensor variation.
These values can be automatically corrected.
Imported datasets can be validated using:
validate_ankom(
gp
)
#> rumenGP data validation passed.
#> Observations: 6
#> Heads: 2
#> Treatments: 2
#> Head Bottle Rep Treatment Time_h Gas_mL
#> 1 1 1 1 Control 0 0
#> 2 1 1 1 Control 4 20
#> 3 1 1 1 Control 8 40
#> 4 2 2 1 Corn 0 0
#> 5 2 2 1 Corn 4 35
#> 6 2 2 1 Corn 8 60The function checks:
Once imported, manually collected datasets can be analyzed exactly like ANKOM datasets.
fit <- fit_groot(
gp
)
#> rumenGP data validation passed.
#> Observations: 6
#> Heads: 2
#> Treatments: 2
#> Warning in nls.lm(par = start, fn = FCT, jac = jac, control = control, lower = lower, : lmdif: info = 0. Improper input parameters.
#> Warning in nls.lm(par = start, fn = FCT, jac = jac, control = control, lower = lower, : lmdif: info = 0. Improper input parameters.Inspect results:
comparison <- compare_models(
Groot = fit_groot(gp),
Brody = fit_brody(gp),
Gompertz = fit_gompertz(gp)
)
#> rumenGP data validation passed.
#> Observations: 6
#> Heads: 2
#> Treatments: 2
#> Warning in nls.lm(par = start, fn = FCT, jac = jac, control = control, lower = lower, : lmdif: info = 0. Improper input parameters.
#> Warning in nls.lm(par = start, fn = FCT, jac = jac, control = control, lower = lower, : lmdif: info = 0. Improper input parameters.
#> rumenGP data validation passed.
#> Observations: 6
#> Heads: 2
#> Treatments: 2
#> rumenGP data validation passed.
#> Observations: 6
#> Heads: 2
#> Treatments: 2
comparison
#> Model Bottles Successful_Fits Failed_Fits Mean_R2 Mean_RMSE
#> 1 Groot 2 2 0 -0.8504581 15.39025685
#> 2 Brody 2 2 0 0.9999943 0.02766102
#> 3 Gompertz 2 0 2 NaN NaN
#> Mean_RSS Mean_AIC Mean_BIC Lambda_Boundary
#> 1 5.033062e+02 24.48171 19.25430 0
#> 2 4.590791e-03 -91.55179 -95.15734 0
#> 3 NaN NaN NaN 0Produces:
Provide either gas_col or pressure_col.
Produces:
Provide only one of gas_col or pressure_col.
The as_rumen_gp() function makes it possible to use
rumenGP with:
Once imported, all datasets become standard rumen_gp
objects and can be analyzed using the full modeling framework.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.