Description Usage Arguments Examples
Definition of an S3 class named DD with the specification of each variable.
The class DD comprises a list whose first component is an object of class
VarNameCorresp and name VNC and the rest of components are objects of class
data.table of names ID, MicroData, ParaData,
Aggregates, AggWeights, Other.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | DD(
VNC = BuildVNC(),
ID = data.table(Variable = character(0), Sort = character(0), Class = character(0),
Length = character(0), Qual1 = character(0), ValueRegExp = character(0)),
MicroData = data.table(Variable = character(0), Sort = character(0), Class =
character(0), Length = character(0), Qual1 = character(0), ValueRegExp =
character(0)),
ParaData = data.table(Variable = character(0), Sort = character(0), Class =
character(0), Length = character(0), Qual1 = character(0), ValueRegExp =
character(0)),
Aggregates = data.table(Variable = character(0), Sort = character(0), Class =
character(0), Length = character(0), Qual1 = character(0), ValueRegExp =
character(0)),
AggWeights = data.table(Variable = character(0), Sort = character(0), Class =
character(0), Length = character(0), Qual1 = character(0), ValueRegExp =
character(0)),
Other = data.table(Variable = character(0), Sort = character(0), Class =
character(0), Length = character(0), Qual1 = character(0), ValueRegExp =
character(0))
)
|
VNC |
Object of class VNC. |
ID |
Object of class data.table. |
MicroData |
Object of class data.table. |
ParaData |
Object of class data.table. |
Aggregates |
Object of class data.table. |
AggWeights |
Object of class data.table. |
Other |
Object of class data.table. |
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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | 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, 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)))
VNC <- BuildVNC(VarList)
IDdt <- data.table(Variable = c('NumIdEst', 'Name', 'Surname', 'PostalAddr', 'PhoneNo'),
Sort = c('IDQual', rep('IDDD', 4)),
Class = rep('character', 5),
Length = c('11', '15', '15', '20','9'),
Qual1 = c('', rep('NumIdEst', 4)),
ValueRegExp = c('[0-9]{9}PP', '.+', '.+', '.+', '(6|9)[0-9]{8}'))
Microdt <- data.table(Variable = c('NumIdEst', 'Market', 'NewOrders'),
Sort = c('IDQual', 'NonIDQual', 'IDDD'),
Class = c(rep('character', 2), 'numeric'),
Length = c('11', '2', '7'),
Qual1 = c(rep('', 2), 'NumIdEst'),
ValueRegExp = c('[0-9]{9}PP', '.+', '([0-9]{1, 10}| )'))
Paradt <- data.table(Variable = c('NumIdEst', 'Action', 'Date'),
Sort = c('IDQual', 'NonIDQual', 'IDDD'),
Class = rep('character', 3),
Length = c('11', '10', '10'),
Qual1 = c(rep('', 2), 'NumIdEst'),
Qual2 = c(rep('', 2), 'Action'),
ValueRegExp = c('[0-9]{9}PP', 'Collection|Editing|Imputation',
'(([0-9]{2}-(0[1-9]|1(0-2))-[0-9]{4})| )'))
DD <- DD(VNC = VNC, ID = IDdt, MicroData = Microdt, ParaData = Paradt)
DD
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.