# Source: cnet-data-portal (MIT, mclement18)
# File: app/utils/calculation_functions.R
# Lines: 64-82
#
# Verbatim copy — do not modify. See generate_fixtures.R for the
# standalone version used to produce golden test values.
{
# Check that df has only one row and one column
if ( == 1 & == 2) {
# Get the two first clumns of the df
col1 <- df %>%
col2 <- df %>%
# If col1 is NA, set it to col2
if () {
# Return the difference
return(col2)
} else {
return(col1)
}
}
# If nothing is returned, return NA
}