make_n_and_percent_table | R Documentation |
Make a table showing the number (n) and percent of the population (e.g. % of nrow()) for each value in a variable(s).
make_n_and_percent_table(data, columns)
data |
A data.frame with the data you want to make the table from. |
columns |
A string or vector of strings with the column names to make the N and % from. |
A data.frame with one row for each value in the inputted variable(s) and columns showing the N and % for that value.
make_n_and_percent_table(mtcars, c("cyl", "gear"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.