View source: R/discrete_table.R
discrete_table | R Documentation |
Takes a dataframe and produces the number and percentage for discrete variables.
discrete_table(
df = .,
...,
group = .,
time = .,
total = TRUE,
n = FALSE,
missing = "Missing",
accuracy = 0.1,
condense = FALSE
)
df |
Data Frame |
... |
Variables to be summarised |
group |
Optional variable that defines the grouping |
time |
Optional variable for repeated measures (currenlty must me used with group) |
total |
Logical indicating whether a total column should be created |
n |
Logical indicating whether percentages should be out of n
( |
missing |
String determining what missing data will be called
(if |
accuracy |
see details of |
condense |
should the |
A tibble data frame summarising the data
library(ggplot2) # for the data
discrete_table(df = mpg, drv, group = manufacturer)
discrete_table(df = mpg, drv)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.