unbox_label: Unbox Label

Description Usage See Also Examples

View source: R/format.R

Description

Unboxing refers to the process of both unmerging a column, either a label or a strip, while also separating rowwise by the 'sep' argument. It is meant to isolate the Concept attributes from a merge column while also taking in account that rowwise aggregates may have also occurred, and without separating these values out, some concepts in the source data may be misparsed.

Usage

1
unbox_label(data, label_col, sep = "\n", remove = FALSE)

See Also

separate_rows

Other concept format functions: filter_at_all_strip(), filter_at_any_strip(), filter_strip(), get_strip(), label_to_strip(), merge_label(), merge_strip(), unbox_strip(), unmerge_label(), unmerge_strip()

Other unboxing functions: unbox_strip()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
library(tidyverse)
library(chariot)

get_strip(concept_id = 1112807,
         vocab_schema = "omop_vocabulary")

test_strip <- tibble::tibble(concept = "[V] [S] 1112807 aspirin [RxNorm 1191] [Drug] [Ingredient]")
unmerge_strip(test_strip,
              strip_col = concept)

unbox_strip(test_strip,
            strip_col = concept)

test_strip <- tibble::tibble(concept = "[V] [S] 1112807 aspirin [RxNorm 1191] [Drug] [Ingredient]\n[V] [S] 1112807 aspirin [RxNorm 1191] [Drug] [Ingredient]")
unbox_strip(test_strip,
            strip_col = concept)

patelm9/chariot documentation built on Feb. 19, 2022, 11:29 a.m.