median_iqr2 | R Documentation |
Calculates the median and interquartile range of a numeric column in a dataframe and returns a character column in the form of median (Q25 - Q75).
median_iqr2(df, new_col, variable, digits = 1, to = " - ")
df |
Dataframe. |
new_col |
Name of the new column. |
variable |
Numeric column used for calculation. |
digits |
Optional number of decimal places. |
to |
Optional character placed between Q25 and Q75, default is " - ". |
Summarised character column.
median_iqr2(mtcars, "mpg", mpg) median_iqr2(mtcars, "mpg", mpg, to = " to ")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.