getIDDD: Return IDDD identifiers (statistical variable names) from the...

Description Usage Arguments Value Examples

Description

getIDDD returns the IDDD identifiers from input object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
getIDDD(object, CompNames = names(object))

## S4 method for signature 'VNC'
getIDDD(object, CompNames = names(object))

## S4 method for signature 'DD'
getIDDD(object, CompNames = setdiff(names(object), "VNC"))

## S4 method for signature 'StQ'
getIDDD(object, CompNames = setdiff(names(getDD(object)), "VNC"))

Arguments

object

Object whose IDDD identifiers in the slot DD are required.

CompNames

Character vector with the names of components or slots of the object from which the IDDD identifiers are requested.

Value

Returns a character vector with the IDDD identifiers from the components specified in CompNames. If no CompNames parameter is specified, it returns the IDDD identifiers from all the components of the input object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# An example:
library(data.table)
### We build the VNC object
VarList <- list(ID = data.table(IDQual = c('NumIdEst', rep('', 4)),
                                NonIDQual = c('','','','',''),
                                IDDD = c('', 'Name', 'Surname', 'PostalAddr', 'PhoneNo'),
                                NumIdEst = c('', rep('.', 4)),
                                UnitName = c('numidest', 'nombre', 'apellidos', 'direccion', 'telefono'),
                                InFiles = rep('FI', 5)),
MicroData = data.table(IDQual = c('NumIdEst', rep('', 2)),
                       NonIDQual = c('', 'Market', ''),
                       IDDD = c(rep('', 2), 'NewOrders'),
                       NumIdEst = c(rep('', 2), '.'),
                       Market = c(rep('', 2), '1.'),
                       UnitName = c('numidest', '', 'cp09'),
                       InFiles = rep('FF', 3)),
ParaData = data.table(IDQual = c('NumIdEst', rep('', 2)),
                      NonIDQual = c('', 'Action', ''),
                      IDDD = c(rep('', 2), 'Date'),
                      NumIdEst = c(rep('', 2), '.'),
                      Action = c(rep('', 2), 'Imputation'),
                      UnitName = c('numidest', '', 'FechaImput'),
                      InFiles = rep('FP', 3)),
AggWeights = data.table(IDQual = c('CCAA', 'NACE09', ''),
                        NonIDQual = rep('', 3),
                        IDDD = c('', '', 'Ponderacion'),
                        CCAA = c('', '', '.'),
                        NACE09 = c('', '', '.'),
                        UnitName = c('Provincia', '', ''),
                        InFiles = rep('FF', 3)))

VNC <- BuildVNC(VarList)

getIDDD(VNC)

david-salgado/StQ documentation built on Aug. 12, 2021, 3:23 p.m.