Tell whether a final-to-useful efficiency table has been completed
eta_fu_table_completed.Rd
A final-to-useful efficiency table is complete iff all of the machines in a final-to-useful allocation table have been assigned efficiencies in each year for each country.
Usage
eta_fu_table_completed(
eta_fu_table = NULL,
machines_that_need_quantities,
which_quantity = c(IEATools::template_cols$eta_fu, IEATools::template_cols$phi_u),
e_dot = IEATools::iea_cols$e_dot,
year = IEATools::iea_cols$year,
method = IEATools::iea_cols$method,
energy_type = IEATools::iea_cols$energy_type,
last_stage = IEATools::iea_cols$last_stage,
ledger_side = IEATools::iea_cols$ledger_side,
flow_aggregation_point = IEATools::iea_cols$flow_aggregation_point,
unit = IEATools::iea_cols$unit,
ef_product = IEATools::template_cols$ef_product,
quantity = IEATools::template_cols$quantity,
e_dot_perc = IEATools::template_cols$e_dot_perc,
e_dot_machine = IEATools::template_cols$e_dot_machine,
e_dot_machine_perc = IEATools::template_cols$e_dot_machine_perc,
maximum_values = IEATools::template_cols$maximum_values,
destination = IEATools::template_cols$destination,
eta_fu = IEATools::template_cols$eta_fu,
phi_u = IEATools::template_cols$phi_u,
.values = IEATools::template_cols$.values
)
Arguments
- eta_fu_table
The final-to-useful efficiency table whose completeness is to be determined. If
NULL
(the default), all rows infu_allocation_table
that need efficiencies are returned as the "unallocated_rows" attribute ofFALSE
.- machines_that_need_quantities
The final-to-useful allocation table whose final-to-useful machines must be assigned efficiencies (eta_fu) or exergy-to-energy ratio (phi_u) values.
- which_quantity
A vector of quantities to be completed in the eta_FU table. Default is
c(IEATools::template_cols$eta_fu, IEATools::template_cols$phi_u)
.- e_dot, year, method, ledger_side, flow_aggregation_point, energy_type, last_stage, unit
See
IEATools::iea_cols
.- ef_product, quantity, e_dot_perc, e_dot_machine, e_dot_machine_perc, maximum_values, destination, eta_fu, phi_u, .values
Value
A boolean telling whether eta_fu_table
is complete.
If FALSE
, a data frame of fu_allocation_table machines that lack efficiencies
is stored in the "unallocated_rows" attribute of the return value.
Retrieve with attr(done, "unallocated_rows")
if the result of this function is assigned to the variable done
.
Details
This function should really be named eta_fu_table_completed?
, because it answers a question.
Examples
fu_allocations <- load_fu_allocation_data()
fu_efficiencies <- load_eta_fu_data()
eta_fu_table_completed(fu_efficiencies, fu_allocations)
#> [1] TRUE