powered by
Helper function extract a metadata comment
getFromComment(x, name)
object the metadata should be extracted from
name of the metadata to be extracted (e.g. unit)
Jan Philipp Dietrich
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