Description Usage Arguments Value See Also Examples
dcast_StQ
returns a data.table in dcasted form (observations by
row and variables by columns) with data from the input StQ object.
This method converts the slot Data
from the input StQ
object into a
data.table with statistical units by row and variables specified in the input
parameter VarNames
by columns.
To distinguish between variables and qualifiers this function makes use of the slot DD
of
input StQ variable.
This method is indeed a wrapper for the function dcast.data.table
of
the package data.table, adapted to the structure of object StQ.
1 2 3 4 |
object |
Object of class StQ whose slot |
VarNames |
|
UnitNames |
|
Returns a data.table with data from slot Data
of the input
StQ object with statistical units by rows and variables by columns. Only variables
in VarNames
will be output. If no variable name is specified, all variables in the input
object will be output.
melt_StQ
, dcast.data.table
,
melt.data.table
, melt
,
dcast
1 2 3 4 5 6 7 8 | data(ExampleStQ)
Mat <- dcast_StQ(ExampleStQ, VarNames = 'Turnover')
Mat
str(Mat)
dcast_StQ(ExampleStQ, VarNames = 'Employees')
dcast_StQ(ExampleStQ[ID != ''])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.