R: The '[.' method for '"RuleSetRST"' objects

[.RuleSetRST {RoughSets} | R Documentation

## The `[.` method for `"RuleSetRST"` objects

### Description

Subsetting a set of decision rules.

### Usage

    ## S3 method for class 'RuleSetRST'
    x[i, ...]

### Arguments

`x` | a `"RuleSetRST"` object from which to extract rules(s) or in which to replace rules(s). See `RI.LEM2Rules.RST`.
`i` | integer indices specifying elements to be extracted or replaced.
`...` | the other parameters.

### Value

A subset of rules.

### Author(s)

Andrzej Janusz

### Examples

    ###########################################################
    ## Example : Subsetting a set of decision rules
    ###########################################################
    data(RoughSetData)
    hiring.data <- RoughSetData$hiring.dt

    rules <- RI.LEM2Rules.RST(hiring.data)

    rules

    # taking a subset of rules
    rules[1:3]
    rules[c(TRUE,FALSE,TRUE,FALSE)]

    # replacing a subset of rules
    rules2 <- rules
    rules2[c(2,4)] <- rules[c(1,3)]
    rules2

[Package RoughSets version 1.3-7 Index]