InfoManipulation: Functions to Manipulate HYPE Info Files

InfoManipulationR Documentation

Functions to Manipulate HYPE Info Files

Description

Add/Remove lines to HYPE info.txt files

Usage

AddInfoLine(info, name, value, after = NULL)

RemoveInfoLine(info, name)

Arguments

info

Named list containing the info.txt file data, typically created using ReadInfo with the exact mode.

name

Name of info.txt code to add/remove.

value

Value of the info.txt code to add/remove.

after

String vector containing the name(s) of info.txt codes that the new info.txt code should be inserted below. If multiple values are specified and all codes are present in info, then the new code will be inserted below the match that is farthest down in the info.txt file.

Details

The AddInfoLine and RemoveInfoLine functions provide features to add/remove lines to an imported info.txt file. Info.txt codes can be found on the HYPE Wiki.

Value

AddInfoLine and RemoveInfoLine return a named list in the info.txt file structure.

Examples

info <- ReadInfo(filename = system.file("demo_model",
"info.txt", package = "HYPEtools"))
info <- AddInfoLine(info, name = "testline", value = "testvalue")
info <- RemoveInfoLine(info, name = "testline")


rcapell/RHYPE documentation built on Feb. 28, 2024, 3:11 p.m.