View source: R/descriptive-table.R
descriptive | R Documentation |
This function has been superseeded by tab_linelist()
. Please use that
function instead.
descriptive(
df,
counter,
grouper = NULL,
multiplier = 100,
digits = 1,
proptotal = FALSE,
coltotals = FALSE,
rowtotals = FALSE,
explicit_missing = TRUE
)
df |
A dataframe (e.g. your linelist) |
counter |
A name of the variable (in quotation marks) that you would like to have as rows. |
grouper |
A name of the variable (in quotation marks) that you would like to have as columns. |
multiplier |
What you would like to have your proportions as (default is per 100). |
digits |
The number of decimal places you would like in your proportions (default is 1). |
proptotal |
A TRUE/FALSE variable specifying whether you would proportions to be of total cases.The default is FALSE and returns proportions for each column. |
coltotals |
Add column totals on the end |
rowtotals |
Add row totals (only sums counts) |
explicit_missing |
if |
The descriptive()
function returns a single table with counts and
proportions of a categorical variable (counter
). Adding a grouper adds
more columns, stratifying "n" and "prop", the option coltotals = TRUE
adds one row and rowtotals = TRUE
(useful if a grouper is present) adds
one column.
The multi_descriptive()
function allows you to combine several counter
variables into a single table where each row represents a variable and the
columns represent counts and proportions of the values within those
variables. This function assumes that all of the variables have the same
values (e.g. Yes/No values) and atttempts no correction.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.