verify_mw_energy_balance: Verify energy balance in muscle work PSUT matrices

View source: R/mw_functions.R

verify_mw_energy_balanceR Documentation

Verify energy balance in muscle work PSUT matrices

Description

After constructing the muscle work PSUT matrices, energy balance should be verified. Internally, this function uses Recca::verify_SUT_energy_balance() to ensure that everything is balanced.

Usage

verify_mw_energy_balance(
  .psut_df,
  countries,
  country = MWTools::mw_cols$country
)

Arguments

.psut_df

A data frame of muscle work PSUT matrices.

countries

The countries to be analyzed.

country

The name of the country column in .psut_df.

Details

If .psut_df has zero rows, TRUE is returned, enabling the pipeline to continue, even if there are some years where there is no muscle work data available.

Value

A data frame with new boolean column ".balanced" that tells whether the matrices are balanced.


EnergyEconomyDecoupling/PFUDatabase documentation built on Feb. 8, 2024, 8:45 a.m.