1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Source: cnet-data-portal (MIT, mclement18)
# File: app/utils/calculation_functions.R
# Lines: 654-683
#
# Verbatim copy — do not modify. See generate_fixtures.R for the
# standalone version used to produce golden test values.
{
# Check for the presence of the correct columns
allColumns <- == 2
if ( == 1 & allColumns) {
# Get values
lab_co2_h2o <- df %>% %>%
lab_co2_ch4 <- df %>% %>%
# If no NAs, calculate Chla acidified
if (!) {
return(
(lab_co2_h2o * 1.2347 - 0.0016) * lab_co2_ch4 / 100 + lab_co2_ch4
)
}
}
# If nothing is returned, return NA
}