tidy_iea_df_balanced: Tell whether _all_ rows of a tidy IEA data frame are balanced

View source: R/energy_balance.R

tidy_iea_df_balancedR Documentation

Tell whether all rows of a tidy IEA data frame are balanced

Description

This function provides a handy way to tell if all rows of .tidy_iea_df_balance are in balance. Argument .tidy_iea_df_balances should be set to the value of a call to calc_tidy_iea_df_balances().

Usage

tidy_iea_df_balanced(.tidy_iea_df_balances, balance_OK = "balance_OK")

Arguments

.tidy_iea_df_balances

an IEA-style data frame containing a column that indicates whether each row is in balance.

balance_OK

the name of a new logical column that tells whether a row's energy balance is OK. Default is "balance_OK".

Value

TRUE if all groups of .tidy_iea_df_balances are balanced, FALSE otherwise.

Examples

library(dplyr)
load_tidy_iea_df() %>% 
  calc_tidy_iea_df_balances() %>% 
  tidy_iea_df_balanced()

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