rawStQ: S4 class for sets of _raw_ _St_andarized _Q_uestionnaires

Description Usage Slots Examples

View source: R/rawStQ.R

Description

Definition of an S4 class named rawStQ for sets of raw standardized questionnaires.

The structure of the class rawStQ comprises 2 attributes:

Usage

1
2
3
4
5
rawStQ(
  rawData = data.table(IDDDKey = character(0), QualKey = character(0), Value =
    character(0)),
  DD = BuildDD()
)

Slots

rawData

Object of class data.table with key-value pair structure. It must have exactly three columns: IDDDKey, QualKey and Value. It contains all statistical variables (including some metadata) together with their corresponding values. If rawData is not specified as an input parameter, an empty data.table object with columns IDDDKey, QualKey and Value will be initiated.

DD

Object of class DD with the definition and properties of all variables. If DD is not specified as an input parameter, an empty DD object with all its components will be initiated.

Examples

1
2
3
4
5
6
7
8
9
# An empty standardized questionnaire set:
rawStQ()

library(data.table)
data(ExampleDD)
rawData <- data.table(IDDDKey = c('Employees', 'Employees', 'RemEmployees', 'Turnover'),
                      QualKey = c('25641378SS2.1.1.', '25641378SS1.    ', '25641378SS    1.', '25641378SS'),
                      Value = c('625', '954', '122', '105124'))
rawStQ(rawData, ExampleDD)

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