fhir_rm_indices: Remove indices from data.frame/data.table

Description Usage Arguments Value See Also Examples

View source: R/multiple_entries.R

Description

Removes the indices in front of multiple entries as produced by fhir_crack() when brackets are provided in the design.

Usage

1
2
3
4
5
fhir_rm_indices(
  indexed_data_frame,
  brackets = c("<", ">"),
  columns = names(indexed_data_frame)
)

Arguments

indexed_data_frame

A data frame with indices for multiple entries as produced by fhir_crack()

brackets

A character vector of length two defining the brackets that were used in fhir_crack()

columns

A character vector of column names, indicating from which columns indices should be removed. Defaults to all columns.

Value

A data frame without indices.

See Also

fhir_melt()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#unserialize example
bundles <- fhir_unserialize(bundles = example_bundles1)

patients <- fhir_table_description(resource = "Patient")

df <- fhir_crack(bundles = bundles,
                  design = patients,
                  brackets = c("[", "]"))

df_indices_removed <- fhir_rm_indices(indexed_data_frame = df, brackets=c("[", "]"))

fhircrackr documentation built on June 17, 2021, 5:12 p.m.