| cer_nger_scope | R Documentation |
Given an NGER corporate-level data frame from
cer_nger_corporate(), select the requested scope columns and
error if they are not present. Avoids the silent-misaggregation
failure mode where a user sums a column that is actually Scope
1+2 combined when they intended Scope 1 only.
cer_nger_scope(
x,
scope = c("1_plus_2", "1", "2_market", "2_location"),
col_pattern = NULL
)
x |
A |
scope |
One of |
col_pattern |
Optional regex override for the target column. |
Column-name detection is heuristic because NGER renames columns
year to year. Pass col_pattern to override.
A data frame with an emissions_t_co2e column populated
by the requested scope and a scope column recording which
scope was selected.
Other nger:
cer_nger_climate_active(),
cer_nger_corporate(),
cer_nger_electricity()
op <- options(cer.cache_dir = tempdir())
try({
x <- cer_nger_corporate(2025)
cer_nger_scope(x, scope = "1")
})
options(op)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.