Description Usage Arguments Details Value Examples
Combine elements of a frequency table into a (character) string.
1 2 |
data |
frequency table (table(x) output). |
expl_text |
text which is to be appended at the end of the string (e.g. "(Percent of diagnoses)") (character). |
element_number |
number of rows of the frequency table which are to be included (integer) [default:10]. |
sort |
whether to sort the frequency table (descending order) (logical - TRUE/FALSE) [default: TRUE]. |
item_sep |
symbol used to separate the elements in the string (character) [default: "//"]. |
text_col |
name of text column (character) [default: automatically identify column based on column types]. |
number_col |
name of number column (character) [default: automatically identify column based on column types]. |
Maintained by: Clara Marquardt
formatted (character) string or data.table.
1 2 3 | data_raw <- prop.table(table(dia$dia_name))*100
freq_string <- stringify_frequency(data=data_raw, expl_text="Percent of Principal Diagnoses (%)", element_number=5, sort=TRUE, item_sep="//", ndigit=3)
print(freq_string)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.