outputs_unit_homogeneous: Tell whether industry outputs are unit-homogeneous

View source: R/utilities.R

outputs_unit_homogeneousR Documentation

Tell whether industry outputs are unit-homogeneous

Description

Returns TRUE if each industry's output are unit-homogeneous.

Usage

outputs_unit_homogeneous(
  .sutmats = NULL,
  V = "V",
  S_units = "S_units",
  keep_details = FALSE,
  outs_unit_homogeneous = ".outputs_unit_homogeneous"
)

Arguments

.sutmats

a data frame of supply-use table matrices with matrices arranged in columns.

V

a make (V) matrix or name of the column in .sutmats that contains same. Default is "V".

S_units

an S_units matrix or name of a column in .sutmats that contains same. Default is "S_units".

keep_details

if TRUE, per-industry results are returned; if FALSE, per-ECC results are returned.

outs_unit_homogeneous

the name of the output column that tells whether each industry's outputs are unit-homogeneous. Default is ".outputs_unit_homogeneous".

Details

The V_bar matrix is queried for the number of non-zero entries in each row. If the number of non-zero entries in each row is exactly 1, industry outputs are unit-homogeneous. Note that V_bar = matrixproduct_byname(V, S_units).

Value

a list or data frame containing TRUE if outputs from each energy conversion industry are unit-homogeneous, FALSE otherwise.

Examples

library(tidyr)
UKEnergy2000mats %>%
  spread(key = "matrix.name", value = "matrix") %>%
  outputs_unit_homogeneous()

MatthewHeun/Recca documentation built on Feb. 9, 2024, 6:18 p.m.