Description Usage Arguments Value Examples
getData
returns slot Data
from the input object possibly subsetted to
those variables specified as an input parameter.
Input objects can be of class:
StQ
: The input parameters are an object of class StQ and a character
vector, VarNames
, with variable names. It returns the data.table
corresponding to
slot Data
of such an object, but only with variables included in VarNames
. If in
VarNames
only the roots of variable names in the column IDDD
of slot Data
are specified, it returns a data set with all variables which have those roots.
If no variable name is specified in VarNames
, it returns the complete slot Data
.
StQList
: The input parameters are an object of class StQList and a
character vector, VarNames
, with variable names. It returns a list of StQ
objects, but only with variables included in VarNames
, as it is explained above.
rawStQ
: The input parameters are an object of class rawStQ and a
character vector, VarNames
, with variable names. It returns the data.table
corresponding to slot Data
of such an object, but only with variables included in
VarNames
.
rawStQList
: The input parameters are an object of class rawStQList and
a character vector, VarNames
, with variable names. It returns a list of
rawStQ objects, but only with variables included in VarNames
.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
object |
Object whose (possibly subsetted) slot |
VarNames |
|
In the case of StQ/rawStQ objects, it returns a
data.table with key-value pair structure corresponding to slot Data
from the
input object with the values of the variables restricted to variable names specified in
VarNames
. In the case of StQList/rawStQList objects, it
returns a list of StQ/linkS4classrawStQ objects.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # From an StQ object
VarNames <- c('Employees_1.')
getData(ExampleStQ, VarNames)
VarNames <- c('Turnover')
getData(ExampleStQ, VarNames)
# From a rawStQ object
VarNames <- c('Turnover')
getData(ExamplerawStQ, VarNames)
# From an StQList object
mm <- c(paste0('0', 1:9), 10:12)
TimePer <- paste0('MM', mm, '2015')
QList <- vector('list', 12)
QList <- lapply(QList, function(x) ExampleStQ)
names(QList) <- TimePer
QList <- BuildStQList(QList)
VarNames <- c('Turnover', 'Employees_1.')
getData(QList, VarNames)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.