remove_agg_regions: Remove aggregation regions from an IEA data frame

View source: R/initialize.R

remove_agg_regionsR Documentation

Remove aggregation regions from an IEA data frame

Description

The IEA extended energy balances contain several aggregation regions by default. In some situations, it may be desirable to remove those aggregation regions. This function performs that task.

Usage

remove_agg_regions(
  .iea_df,
  country = IEATools::iea_cols$country,
  agg_regions = IEATools::aggregation_regions
)

Arguments

.iea_df

The IEA data frame from which you want to remove aggregation regions.

country

The name of the Country column in .iea_df. Default is IEATools::iea_cols$country.

agg_regions

A list of aggregation regions in the country column of .iea_df. Default is IEATools::aggregation_regions.

Value

A version of .iea_df with aggregation regions removed.

Examples

tibble::tibble(Year = c(1967, 1995), 
               Country = c("World", "Spain")) %>%
 remove_agg_regions()

MatthewHeun/IEATools documentation built on Dec. 14, 2024, 12:08 a.m.