freqtbl | R Documentation |
creates frequency tables the way I like them. with freq, valid pct, and in descending order of frequency. this function allows you to change the name of the category columns, and whether or not totals and NAs are displayed. this funtion can also add standard binomial and multinomial confidence intervals if desired.
freqtbl(
variable,
name = "Category",
total = FALSE,
countna = TRUE,
orderbycat = FALSE,
reverseorder = TRUE,
mci = "none",
bci = "none",
rnd = 2
)
variable |
the variable from which a frequency table will be created |
name |
the name to appear in the table for the different categories. defaults to 'Category' |
total |
boolean argument determining if a total should be added to the bottom of the table. defaults to FALSE |
countna |
boolean argument determining if na's should be omitted (FALSE) or added as a frequency category (TRUE). defaults to TRUE |
orderbycat |
boolean argument determining if the table sould be sorted by its categories (TRUE) instead of its frequencies (FALSE). defaulst to FALSE |
reverseorder |
boolean argument determining if the table should be sorted from lowest to highest frequency (FALSE). defaults to TRUE |
mci |
optional argument to compute multinomial (more than 2 categories) confidence intervals using MultinomCI. can take any of the method inputs for MultinomCI ("sisonglaz", "cplus1", "goodman", "wald", "waldcc", "wilson"). defaults to 'none' which means mutli cis will not be included. |
bci |
optional argument to compute standard binomial (2 categories) confidence intervals using BinomCI. can take any of the method inputs for BinomCI ("wald", "wilson", "wilsoncc", "agresti-coull", "jeffreys", "modified wilson", "modified jeffreys", "clopper-pearson", "arcsine", "logit", "witting" or "pratt"). defaults to 'none' which means binom cis will not be included. |
rnd |
number of decimals to round all calculations to |
freqtbl_function()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.