VNC: S3 class object constructor for the correspondence between...

Description Usage Examples

View source: R/VNC.R

Description

Definition of an S3 class named VarNameCorresp with the correspondence between variable names used by the different production unit for a given statistical variable and variable names according to the key-value pair data model with qualifiers given by statistical metadata.

The class VarNameCorresp comprises a list whose components are data.tables with a row per each variable and the following columns:

Usage

1
2
3
4
5
6
7
VNC(
  ID = data.table(IDQual = character(0), NonIDQual = character(0), IDDD = character(0),
    UnitName = character(0), InFiles = character(0)),
  MicroData = data.table(IDQual = character(0), NonIDQual = character(0), IDDD =
    character(0), UnitName = character(0), InFiles = character(0)),
  ...
)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
library(data.table)
VNC <- VNC(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, FD, FG', 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)))

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