check_fu_allocation_data | R Documentation |
When analysts fill final-to-useful allocation templates created with
fu_allocation_template()
, some errors are likely.
This function checks for typical errors and
emits helpful error messages that point the analyst to the location of the problem.
check_fu_allocation_data(
.fu_allocation_table,
country = IEATools::iea_cols$country,
year = IEATools::iea_cols$year,
flow_aggregation_point = IEATools::iea_cols$flow_aggregation_point,
machine = IEATools::template_cols$machine,
ef_product = IEATools::template_cols$ef_product,
eu_product = IEATools::template_cols$eu_product,
destination = IEATools::template_cols$destination,
quantity = IEATools::template_cols$quantity,
.values = IEATools::template_cols$.values,
non_energy_machine = "Non-energy"
)
.fu_allocation_table |
The final-to-useful allocation table you want to check. |
country , year , flow_aggregation_point |
See |
machine , ef_product , eu_product , destination , quantity , .values |
See |
non_energy_machine |
The string that identifies a Non-energy machine. Default is "Non-energy". |
This function checks for two typical errors.
First, this function checks that ef_product
and eu_product
are identical
when machine
is non_energy_machine
.
Second, this function checks that machine
and eu_product
are present
when .values
is not NA
.
This check is performed on a tidy version of .fu_allocation_table
.
TRUE
if the checks are successful. An error is emitted if the checks fail.
load_fu_allocation_data() %>%
check_fu_allocation_data()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.