population: population

View source: R/population.R

populationR Documentation

population

Description

reads population out of a MAgPIE gdx file

Usage

population(
  gdx,
  file = NULL,
  level = "reg",
  age = FALSE,
  sex = FALSE,
  bmi_groups = FALSE,
  dir = ".",
  spamfiledirectory = ""
)

Arguments

gdx

GDX file

file

a file name the output should be written to using write.magpie

level

Level of regional aggregation; "reg" (regional), "glo" (global), "regglo" (regional and global) or any other aggregation level defined in superAggregate

age

if TRUE, population is split up by age groups

sex

if TRUE, population is split up by sex

bmi_groups

if TRUE, the population will be split up in body-mass-index groups.

dir

for gridded outputs: magpie output directory which contains a mapping file (rds) for disaggregation

spamfiledirectory

deprecated. please use dir instead

Value

population as MAgPIE object (million people)

Author(s)

Florian Humpenoeder, Benjamin Bodirsky, Isabelle Weindl

See Also

reportPopulation

Examples

## Not run: 
x <- population(gdx)

## End(Not run)


pik-piam/magpie4 documentation built on May 7, 2024, 11:13 p.m.