impimp (version 0.3.1)

generateTupelData: Tuple representation

Description

Generating a tuple representation of a data.frame with imprecise observations

Usage

generateTupelData(data, constraints = NULL)

Arguments

data

a data.frame object, with potentially imprecise entries; see 'Note'.

constraints

a list of so-called logical constraints or fixed zeros. Each element must be an object of class "impimp_event". See 'Details'.

Value

A list of length NROW(data) of data.frames for the observation within the original data.frame.

Each such data.frame contains the precise observations which are compatible with its imprecise representation.

Details

By specifying constraints one can exlude combinations of imputed values which are deemed impossible, so called ‘logical constraints’ or ‘fixed zeros’.

See Also

impimp, impimp_event for sepcifying the constraints

Examples

Run this code
# NOT RUN {
A <- data.frame(x1 = c(1,0), x2 = c(0,0),
                y1 = c(1,0), y2 = c(2,2))
B <- data.frame(x1 = c(1,1,0), x2 = c(0,0,0),
                z1 = c(0,1,1), z2 = c(0,1,2))
AimpB <- impimp(A, B, method = "domain")

## no constraints
generateTupelData(AimpB)

## (y1,z1) = (0,0) as constraint
generateTupelData(AimpB, list(impimp_event(y1 = 0, z1 = 0)))

# }
# NOT RUN {
data(iris)
generateTupelData(iris) # emits a warning
# }

Run the code above in your browser using DataCamp Workspace