toolRegionSubsets: toolRegionSubsets Returns a list of parent regions that are...

Description Usage Arguments Value Author(s) Examples

View source: R/toolRegionSubsets.R

Description

toolRegionSubsets Returns a list of parent regions that are equal to a child mapping union of region mappings.

Usage

1
2
3
4
5
6
7
8
9
toolRegionSubsets(
  gdx = NULL,
  map = NULL,
  parentMapping = NULL,
  singleMatches = FALSE,
  removeDuplicates = TRUE,
  regionIndex = NULL,
  countryIndex = NULL
)

Arguments

gdx

a GDX as created by readGDX, or the file name of a gdx. Gdx file containing child mapping regions list.

map

alternative to gdx file. You can also provide a child mapping csv file.

parentMapping

parent mapping or csv file (if NULL it uses the "regionmappingH12.csv").

singleMatches

if true, includes single element matches in the return list. Default: FALSE

removeDuplicates

if true, removes from the return list identic matches (a region with the same name and countries for both parent and child mappings). Default: TRUE

regionIndex

Name or index of the region column to be used in the parent mapping (if not set the column with less unique elements from the last two columns will be used).

countryIndex

Name or index of the country column to be used in parent mapping (if not set the column with more unique elements from the last two columns will be used).

Value

return: returns a list of parent regions that are equal to a child mapping union of region mappings.

Author(s)

Renato Rodrigues

Examples

1
## Not run: toolRegionSubsets(gdx)

pik-piam/remind documentation built on Sept. 9, 2021, 1:09 p.m.