Learn R Programming

validate (version 1.1.5)

description: Rule description

Description

A longer (typically one-paragraph) description of a rule.

Usage

description(x, ...)

description(x) <- value

# S4 method for rule description(x, ...)

# S4 method for rule,character description(x) <- value

# S4 method for expressionset description(x, ...)

# S4 method for expressionset,character description(x) <- value

Value

A character vector.

Arguments

x

and R object

...

Arguments to be passed to other methods

value

Value to set

See Also

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

Examples

Run this code

# retrieve properties
v <- validator(turnover > 0, staff.costs>0)

# number of rules in v:
length(v)

# per-rule
created(v)
origin(v)
names(v)

# set properties
names(v)[1] <- "p1"

label(v)[1] <- "turnover positive"
description(v)[1] <- "
According to the official definition,
only positive values can be considered
valid turnovers.
"

# short description is also printed:
v

# print all info for first rule
v[[1]]



# retrieve properties
v <- validator(turnover > 0, staff.costs>0)

# number of rules in v:
length(v)

# per-rule
created(v)
origin(v)
names(v)

# set properties
names(v)[1] <- "p1"

label(v)[1] <- "turnover positive"
description(v)[1] <- "
According to the official definition,
only positive values can be considered
valid turnovers.
"

# short description is also printed:
v

# print all info for first rule
v[[1]]


Run the code above in your browser using DataLab