get_all_products_and_industries | R Documentation |
From matrices that describe an energy conversion chain (R, U, V, and Y), create a list of unique products (energy carriers) and industries (processing stages) in the energy conversion chain.
get_all_products_and_industries(
.sutdata,
piece = "all",
inf_notation = TRUE,
notation = list(RCLabels::notations_list),
choose_most_specific = FALSE,
prepositions = list(RCLabels::prepositions_list),
R = IEATools::psut_cols$R,
U = IEATools::psut_cols$U,
V = IEATools::psut_cols$V,
Y = IEATools::psut_cols$Y,
products_col = Recca::prod_ind_names_colnames$product_names,
industries_col = Recca::prod_ind_names_colnames$industry_names
)
.sutdata |
A data frame or list of |
piece |
A character string indicating which piece of the row or column names to retain, one of "all", "noun", "pps", "pref" or "suff", or a preposition, indicating which part of the row or column name is to be retained. Default is "all". |
inf_notation |
A boolean that tells whether to infer notation.
Default is |
notation |
The notation used for row and column labels.
Default is |
choose_most_specific |
A boolean that indicates whether the most-specific notation
will be inferred when more than one of |
prepositions |
Prepositions that can be used in the row and column label.
Default is |
R , U , V , Y |
The names of PSUT matrices. See |
products_col |
The name of the products column in the output list or data frame.
Default is |
industries_col |
The name of the products column in the output list or data frame.
Default is |
This function is a matsindf::matsindf_apply()
style function.
It can accept a matsindf
data frame in the .df
argument
and string for the R
, U
, V
, and Y
(as column names) in the arguments.
.sutdata
with two new columns containing the names of products and industries.
ecc <- UKEnergy2000mats %>%
tidyr::pivot_wider(names_from = "matrix.name", values_from = "matrix") %>%
get_all_products_and_industries()
# Show all unique product (energy carrier) names in the first row of ecc
ecc[[Recca::prod_ind_names_colnames$product_names]][[1]]
# Show all unique industry (processing stage) names
# in the fourth row of ecc.
ecc[[Recca::prod_ind_names_colnames$industry_names]][[4]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.