origin {validate} | R Documentation |
Origin of rules
Description
A slot to store where the rule originated, e.g. a filename
or "command-line"
for interactively defined rules.
Usage
origin(x, ...)
origin(x) <- value
## S4 method for signature 'rule'
origin(x, ...)
## S4 replacement method for signature 'rule,character'
origin(x) <- value
## S4 method for signature 'expressionset'
origin(x, ...)
## S4 replacement method for signature 'expressionset,character'
origin(x) <- value
Arguments
x |
and R object |
... |
Arguments to be passed to other methods |
value |
Value to set |
Value
A character
vector.
See Also
Other expressionset-methods:
as.data.frame()
,
as.data.frame,expressionset-method
,
created()
,
description()
,
label()
,
meta()
,
names<-,rule,character-method
,
plot,validator-method
,
summary()
,
variables()
,
voptions()
Examples
# 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]]
[Package validate version 1.1.5 Index]