setOther: Set value of slot 'Other'

Description Usage Arguments Value Examples

Description

setOtherDD assigns a data.table to the slot Other of the input object.

Usage

1
2
3
4
5
6
7
setOther(object) <- value

## S4 replacement method for signature 'VNC,data.table'
setOther(object) <- value

## S4 replacement method for signature 'DD,data.table'
setOther(object) <- value

Arguments

object

Object whose slot Other is to be assigned.

value

data.table to be assigned to the slot Other.

Value

Object with slot Other updated.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
library(data.table)
MicroDataDD <- data.table(Variable = 'NewOrders', Sort = 'IDDD', Class = 'numeric',
                          Length = '8',
                          Qual1 = 'NumIdEst', Qual2 = 'Market', ValueRegExp = '')
VarList <- list(MicroData = data.table(IDQual = c('NumIdEst','','',''),
                                       NonIDQual = c('', 'Market', 'Cod', ''),
                                       IDDD = c('', '', '' ,'NewOrders'),
                                       NumIdEst = c('', '', '', '.'),
                                       Market = c('', '', '', '1.'),
                                       Cod = rep('', 4),
                                       UnitName = c('', '', '', 'cp02'),
                                       InFiles = rep('FF', 4)))
VNC <- BuildVNC(VarList)
DD <- DD(VNC = VNC, MicroData = MicroDataDD)
          
Otherdt <- data.table(Variable = c('NACE08'), Sort = c('NonIDQual'), Class = c('character'),
                      Length = '4',
                      Qual1 = c(''), ValueRegExp = c('([0-4][0-9])|(5[0-2])'))
setOther(DD) <- Otherdt
DD

## End(Not run)

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