impimp (version 0.3.1)

impimp_event: Imprecise Events

Description

Helper function to allow the generation of a set of events as cartesian product.

Usage

impimp_event(..., isEventList = FALSE)

is.impimp_event(x)

Arguments

...

these arguments are of the form varname = value. For each component the varname should be a variable name from the underlying data.frame and value a vector of possible outcomes; may also be of length one.

isEventList

logical; if TRUE and ... contains only a list object, this list is treated as if it was an event specification, see .... Since this argument follows ... its name cannot be abbreviated.

x

object to test for class "impimp_event"

Value

A object of class "impimp_event" as a list of lists, where each sublist contains one point in the cartesian product, spanned by the input values and variables.

See Also

impest, impestcond

Examples

Run this code
# NOT RUN {
## underlying data set: x1: 1:6, x2: 1:10

## subspace, requiring: x1 == 1 & ((x2 == 1 ) | (x2 == 2))
impimp_event(x1 = 1, x2 = c(1,2))

## subsapce containing all points whitin the Cartesian
## product of (x1 =) {1,2,3,6} x {5,8} (= x2)
# via  ... argument
impimp_event(x1 = c(1:3,6), x2 = c(5,8))
# via EVENTLIST
impimp_event(list(x1 = c(1:3,6), x2 = c(5,8)),
             isEventList = TRUE)

# }

Run the code above in your browser using DataCamp Workspace