complete_iiasa_template: Complete a table from an IIASA template

Description Usage Arguments Details Functions

Description

The IIASA template contains a series of rows that are meant to be filled in with model data. Occasionally there is a category that is not produced by GCAM. Because we are constructing the output from the data produced by GCAM, such rows will be absent from the output. This function will fill them in with missing data.

Usage

1
2
3

Arguments

filename

The name of the file containing the template

df

A data frame that will become one page of the IIASA results

template

An IIASA template, as described below.

Details

The template supplied should have a series of columns giving the ID variables for the column (i.e., the variables that describe what is supposed to go in the row). Empty columns will be removed from the template (likely to be added back from the data).

For example, a template might have the following columns (columns marked with a * are empty):

Model (*), Scenario (*), Region, Variable, Unit, 2005 (*), 2010 (*), ...

The Region, Variable, and Unit columns would be kept, ensuring that something will be filled in for each combination of those three identifiers. If there is a match for a combination of identifiers, it will be filled in from the GCAM results. Otherwise, it will be filled with NA.

Result rows that are not present in the template will be silently kept.

Functions


JGCRI/gcamrpt documentation built on June 30, 2019, 8:41 a.m.