tidy_eta_fu_table: Tidy a final-to-useful efficiency table

View source: R/tables.R

tidy_eta_fu_tableR Documentation

Tidy a final-to-useful efficiency table

Description

Analysts fill final-to-useful (FU) efficiency tables in a human-readable format provided by eta_fu_template() and write_eta_fu_template(). The templates are not tidy. However, most code uses in IEATools requires tidy data frames. This function converts an FU efficiency table with years in columns to a tidy data frame with years in a year column and eta_fu and phi_u values in a .values column. Identifiers for the variables are in the quantity column.

Usage

tidy_eta_fu_table(
  .eta_fu_table,
  year = IEATools::iea_cols$year,
  unit = IEATools::iea_cols$unit,
  e_dot_machine = IEATools::template_cols$e_dot_machine,
  e_dot_machine_perc = IEATools::template_cols$e_dot_machine_perc,
  quantity = IEATools::template_cols$quantity,
  maximum_values = IEATools::template_cols$maximum_values,
  .values = IEATools::template_cols$.values
)

Arguments

.eta_fu_table

The final-to-useful efficiency table to be tidied.

year, unit

See IEATools::iea_cols.

e_dot_machine, e_dot_machine_perc, quantity, maximum_values, .values

See IEATools::template_cols.

Details

If .eta_fu_table is already tidy, it is returned unmodified.

Value

A tidy version of .eta_fu_table.

Examples

load_eta_fu_data() %>% 
  tidy_eta_fu_table()

MatthewHeun/IEATools documentation built on Feb. 6, 2024, 3:29 p.m.