identify_hrc | R Documentation |
This function renames variables in a long-format metadata data frame based on
their hierarchical groupings. Spanning variables are renamed using the name
of their hierarchy in uppercase, while response variables linked by an
equation (specified in the hrc_indicator
column) are grouped together, and
a new grouping variable is created.
identify_hrc(df_metadata_long)
df_metadata_long |
A data frame in long format with the following required columns:
|
list_hrc_identified
, a list with two elements:
df_indicators
: The updated data frame with renamed variables and grouped
response variables.
df_variable_info
: A data frame mapping original variable names
(spanning_old
) to their renamed counterparts (spanning
).
## Not run:
data(metadata_pizza_lettuce)
metadata_pizza_lettuce_long <- wide_to_long(metadata_pizza_lettuce)
list_hrc_identified <- identify_hrc(metadata_pizza_lettuce_long)
str(list_hrc_identified)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.