magclass (version 4.107.0)

withMetadata: withMetadata (!experimental!)

Description

Convenience function to (de-)activate metadata handling in magpie objects and to return current setting

Usage

withMetadata(set = NULL, verbosity = NULL)

Arguments

set

boolean to switch metadata on/off or NULL to leave the option as is.

verbosity

Integer to set the verbosity level of calcHistory tracking. 0 = no calcHistory tracking, 1 = only the core functions are tracked (e.g. calcOutput, readSource), 2 (default) = most magclass functions and toolAggregate are also tracked, 3 = virtually all functions are tracked.

Value

boolean indicating the current metadata setting (switched on or off)

See Also

getMetadata

Examples

Run this code
# NOT RUN {
 withMetadata()
 withMetadata(TRUE)
 a <- as.magpie(1)
 getMetadata(a)
 withMetadata(FALSE)
# }

Run the code above in your browser using DataCamp Workspace