addToDataChangelog: addToDataChangelog

View source: R/addToDataChangelog.R

addToDataChangelogR Documentation

addToDataChangelog

Description

Prepend data from the given report to the changelog.

Usage

addToDataChangelog(
  report,
  changelog,
  versionId,
  years,
  variables,
  ...,
  maxEntries = 15,
  roundDigits = 2
)

Arguments

report

data.frame as obtained by readRDS("report.rds")

changelog

Path to the changelog file

versionId

The model version identifier, e.g. a release number like 4.9.1 or a date like 2025-02-01

years

For which years the variables should be read and put into the changelog

variables

Which variables to read from the report (e.g. "Emissions|CO2|Land|+|Land-use Change")

...

Reserved for future expansion.

maxEntries

The maximum number of versionIds to keep in the changelog, the oldest one is removed first.

roundDigits

Numbers are rounded to this many decimal places before being written to the changelog.

Value

Invisibly, the written changelog as data.frame

Author(s)

Pascal Sauer


pik-piam/magpie4 documentation built on Feb. 28, 2025, 3:29 p.m.