Learn R Programming

lfl (version 1.4.2)

cbind.fsets: Combine several 'fsets' objects into a single one

Description

Take a sequence of objects of class 'fsets' and combine them by columns. This version of cbind takes care of the vars and specs attributes of the arguments and merges them to the result.

Usage

# S3 method for fsets
cbind(..., deparse.level = 1)

Arguments

...

A sequence of objects of class 'fsets' to be merged by columns.

deparse.level

This argument has currently no function and is added here only for compatibility with generic cbind function.

Value

An object of class 'fsets' that is created by merging the arguments by columns. Also the arguments' attributes vars and specs are merged together.

Details

Take a sequence of objects of class 'fsets' and combine them by columns. This version of cbind takes care of the vars and specs attributes of the arguments and merges them to the result. If some argument does not inherit from class 'fsets' an error is thrown.

The vars attribute is merged by concatenating the vars attributes of each argument. Also the specs attributes of the arguments are merged together.

See Also

vars, specs, fcut, lcut, farules

Examples

Run this code
# NOT RUN {
    d1 <- lcut3(CO2[, 1:2])
    d2 <- lcut3(CO2[, 3:4])
    r <- cbind(d1, d2)

    print(colnames(d1))
    print(colnames(d2))
    print(colnames(r))

    print(vars(d1))
    print(vars(d2))
    print(vars(r))

    print(specs(d1))
    print(specs(d2))
    print(specs(r))
# }

Run the code above in your browser using DataLab