Learn R Programming

madrat (version 3.15.6)

getFromComment: getFromComment

Description

Helper function extract a metadata comment

Usage

getFromComment(x, name)

Arguments

x

object the metadata should be extracted from

name

name of the metadata to be extracted (e.g. unit)

Author

Jan Philipp Dietrich

Examples

Run this code
x <- as.magpie(1)
getComment(x) <- c(" description: example description", " unit: kg")
getFromComment(x, "unit")
getFromComment(x, "description")

Run the code above in your browser using DataLab