View source: R/multiple_entries.R
fhir_melt_internal | R Documentation |
This function handles the core melting operation for multiple entries in an indexed data.table.
It is used internally by fhir_melt()
to separate multiple entries in a given set of columns
into individual rows.
fhir_melt_internal(indexed_dt, columns, brackets, sep, id_name, all_columns)
indexed_dt |
A data.table with indexed multiple entries. |
columns |
A character vector specifying the names of all columns that should be melted simultaneously. It is advisable to only melt columns that belong to the same repeating attribute. |
brackets |
A character vector of length two, defining the brackets used for the indices. |
sep |
A character vector of length one, the separator that was used when pasting together multiple entries. |
id_name |
A character vector of length one, the name of the column that will hold the identification of the origin of the new rows. |
all_columns |
A boolean indicating whether all columns should be returned (default is FALSE). |
A data.table where each entry from the variables in columns
appears in a separate row.
fhir_melt()
, fhir_rm_indices()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.