This reduces the chances that the user will modify the thresholds by mistake.
NOTE. I see a failing check. It may be unrelated but I need to investigate.
reprex
devtools::load_all()
#> ℹ Loading tiltIndicator
companies <- example_companies()
scenarios <- example_scenarios(year = 2050)
# Using the default thresholds yields no warning
out <- sector_profile(companies, scenarios)
# Using the `*threshold` argument in any way yields a warning
out <- sector_profile(companies, scenarios, low_threshold = 1/4)
#> Warning: The default thresholds are generally the most useful.
#> ℹ Do you really need to adjust them?
out <- sector_profile(companies, scenarios, high_threshold = 1/4)
#> Warning: The default thresholds are generally the most useful.
#> ℹ Do you really need to adjust them?
# You get the warning for all indicators, and even if you use the same value
# as the default -- which isn't ideal but is simplest
formals(emissions_profile)
#> $companies
#>
#>
#> $co2
#>
#>
#> $low_threshold
#> 1/3
#>
#> $high_threshold
#> 2/3
co2 <- example_products()
out <- emissions_profile(companies, co2, low_threshold = 1/3)
#> Warning: The default thresholds are generally the most useful.
#> ℹ Do you really need to adjust them?
Closes #753
This reduces the chances that the user will modify the thresholds by mistake.
NOTE. I see a failing check. It may be unrelated but I need to investigate.
reprex
TODO
EXCEPTIONS