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)
A data.table where each entry from the variables in columns
appears in a separate row.
A data.table with indexed multiple entries.
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.
A character vector of length two, defining the brackets used for the indices.
A character vector of length one, the separator that was used when pasting together multiple entries.
A character vector of length one, the name of the column that will hold the identification of the origin of the new rows.
A boolean indicating whether all columns should be returned (default is FALSE).
fhir_melt()
, fhir_rm_indices()