Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/DataFormat_Utils.R
turns a regular wide table into a hierarchical recursive table.
1 | wideTab.to.hierarchicalTab(dataset, col_hierarchy)
|
dataset |
a data.frame. The wide table to be transformed, with columns as hierarchical variables. T |
col_hierarchy |
a data.frame with two columns named "child" and "parent". The hierarchical relations between the columns formatted in a child-parent table listing the column names. Use "root" or NA for columns with no parent. |
Columns in the input data with different levels of a hierarchy are poolled into one column with values and a second column indicating the parent of the value.
a data.frame with three columns: one for the value (cell content in the origical data.frame), it's rank (the original column name), and parent (cell content of the column that is one up in the hierarchy)
Maxime Sweetlove
Other formating functions:
combine.data.frame()
,
combine.data()
,
eMoF.to.wideTable()
,
wideTable.to.eMoF()
1 2 3 4 | ## Not run:
wideTab.to.hierarchicalTab(dataset=test_MIxS)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.