impimp (version 0.3.1)

rbindimpimp: Combine impimp Objects

Description

Combine two object of class "impimp" like rbind would do with data frames.

Usage

rbindimpimp(x, y)

Arguments

x, y

objects of class "impimp". As such may contain variables in form of tuples, they are not required to have the same number of variables as returned from ncol. However, they are required to have the same underlying variables. If that condition is not satisfied an error is raised.

Value

An object of class "impimp", inheriting the attributes, specific to imimp objects, of x and y.

Details

The resulting object is constructed in such a way that minimizes the creation of 'tupled' variables. Only those variables are joined as tuples which are actually necessary to keep the data frame like consise representation of impimp objects.

The attributes "impmethod" and "varlevels" contain the set union of those of x and y on a global and per underlying variable basis, respectively.

See Also

impimp

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))
impA <- impimp(A, B, method = "case_wise")
impB <- impimp(B, A, method = "case_wise")
rbindimpimp(impA, impB)

# }

Run the code above in your browser using DataCamp Workspace