Description Usage Arguments Value Examples
Creates one-hot-matrix of terms in narrative and binds to data.
1 2 3 4 5 6 7 8 9 10 11 | one_hot_single_row_ems_data(
data_in,
narrative_col_to_one_hot = "care_narrative_adj",
complaint_col_to_one_hot = "primary_complaint_adj",
words = dplyr::pull(dplyr::select(dplyr::filter(overdoseR:::high_value_terms,
.data$type == "word"), .data$token)),
bigrams = dplyr::pull(dplyr::select(dplyr::filter(overdoseR:::high_value_terms,
.data$type == "bigram"), .data$token)),
trigrams = dplyr::pull(dplyr::select(dplyr::filter(overdoseR:::high_value_terms,
.data$type == "trigram"), .data$token))
)
|
data_in |
Formatted data to use |
narrative_col_to_one_hot |
Field name for specific narrative to one-hot |
complaint_col_to_one_hot |
Field name for specific complaint to one-hot |
words |
Words to tokenize on, defaults to high_value_terms |
bigrams |
Bigrams to tokenize on, defaults to high_value_terms |
trigrams |
Trigrams to tokenize on, defaults to high_value_terms |
Dataframe of inputted data and one-hot fields from narrative and primary complaint (pc_)
1 | ## Not run: one_hot_single_row_ems_data(formatted_data_frame)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.