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