sub-StQT-method: Extracts parts of an StQT object.

Description Usage Arguments Details Value Examples

Description

[ extracts parts of an object of class StQT.

Usage

1
2
## S4 method for signature 'StQT'
x[i, j, ..., drop = FALSE]

Arguments

x

object of class StQT from which to extract element(s).

i

indices specifying elements to extract.

drop

Included by coherence.

Details

It is indeed the method [ for the class StQT. This method returns an object of class StQT whose rules are the specified subset of the original rules.

Value

Object of class StQT, with the subset of rules.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
rules <- data.frame(domain = c('!is.na(Variable)','is.na(Variable)',''),
                    output = c('MediaVariable','Variable','MediaVariable'),
                    fun =    c('mean','identity','FunDelVar'),
                    input =  c('Variable','MediaVariable',''),
                    by =     c('Estrato','',''),
                    key =    c('Estrato','',''),
                    stringsAsFactors = FALSE)
imputa_media <- NewStQT(rules)
imputa_media
imputa_media[1:2]
imputa_media[3:1]

Luis-Sanguiao/StQT documentation built on May 7, 2019, 2:03 p.m.