View source: R/final_to_useful.R
form_eta_fu_phi_u_vecs | R Documentation |
eta_fu
and phi_u
vectorsThis function creates vectors from a filled final-to-useful efficiency table
created by write_fu_allocation_template()
.
The two vectors are:
eta_fu
: a vector of final-to-useful energy efficiencies, and
phi_u
: a vector of useful exergy-to-useful energy ratios.
form_eta_fu_phi_u_vecs(
.eta_fu_table,
matrix_class = c("matrix", "Matrix"),
unit = IEATools::iea_cols$unit,
year = IEATools::iea_cols$year,
quantity = IEATools::template_cols$quantity,
machine = IEATools::template_cols$machine,
eu_product = IEATools::template_cols$eu_product,
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,
eta_fu = IEATools::template_cols$eta_fu,
phi_u = IEATools::template_cols$phi_u,
phi = IEATools::template_cols$phi,
matnames = IEATools::mat_meta_cols$matnames,
matvals = IEATools::mat_meta_cols$matvals,
rownames = IEATools::mat_meta_cols$rownames,
colnames = IEATools::mat_meta_cols$colnames,
rowtypes = IEATools::mat_meta_cols$rowtypes,
coltypes = IEATools::mat_meta_cols$coltypes,
product = IEATools::row_col_types$product,
industry = IEATools::row_col_types$industry,
arrow_note = RCLabels::arrow_notation,
from_note = RCLabels::from_notation,
.id = ".id"
)
.eta_fu_table |
a final-to-useful efficiency table read by |
matrix_class |
The type of matrix to be created, one of "matrix" or "Matrix". Default is "matrix". |
unit , year |
See |
quantity , machine , eu_product , e_dot_machine , e_dot_machine_perc , maximum_values , eta_fu , phi_u , phi |
See |
matnames , matvals , rownames , colnames , rowtypes , coltypes |
See |
product , industry |
See |
arrow_note , from_note |
Notation vectors used for creating the eta_fu and phi vectors.
See |
.id |
The name of an identification column used internally. Default is ".id". |
The vectors eta_fu
and phi_u
have special rownames that indicate
sources and types of useful energy flows.
Row names in the eta_fu
vector have the pattern
"industry -> product" to indicate
the energy efficiency of "industry" for making "product"
or the exergy-to-energy ratio of the useful energy form created by a final-to-useful machine.
Row names in the phi_u
vector are named by energy product only.
Each energy product should have the same phi, regardless of machine that produced it. So this function checks whether each combination of metadata produces the same phi values. If any different phi values are found, an error is produced.
Columns in the outgoing data frame are named by the variable in the vector:
eta_fu
for final-to-useful efficiencies and
phi_u
for useful exergy-to-useful energy ratios.
a wide-by-matrices data frame with metadata columns (and year)
along with columns for eta_fu
and phi_u
vectors.
load_eta_fu_data() %>%
form_eta_fu_phi_u_vecs()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.