meta: Get or set rule metadata

metaR Documentation

Get or set rule metadata

Description

Rule metadata are key-value pairs where the value is a simple (atomic) string or number.

Usage

meta(x, ...)

meta(x, name) <- value

## S4 method for signature 'rule'
meta(x, ...)

## S4 replacement method for signature 'rule,character'
meta(x, name) <- value

## S4 method for signature 'expressionset'
meta(x, simplify = TRUE, ...)

## S4 replacement method for signature 'expressionset,character'
meta(x, name) <- value

Arguments

x

an R object

...

Arguments to be passed to other methods

name

[character] metadata key

value

Value to set

simplify

Gather all metadata into a dataframe?

See Also

Other expressionset-methods: as.data.frame,expressionset-method, as.data.frame(), created(), description(), label(), names<-,rule,character-method, origin(), plot,validator-method, summary(), variables(), voptions()

Examples


v <- validator(x > 0, y > 0)

# metadata is recycled over rules
meta(v,"foo") <- "bar" 

# assign metadata to a selection of rules
meta(v[1],"fu") <- 2

# retrieve metadata as data.frame
meta(v)

# retrieve metadata as list
meta(v,simplify=TRUE)


validate documentation built on March 24, 2022, 5:07 p.m.