Description Usage Arguments Value Author(s) References Examples
This function generates a descriptive statistics of the data - similar to what proc tabulate procedure does in SAS
1 2 3 |
ADS |
The input data frame. |
vars |
a vector consisting of all the variable names for which the descriptive has to be generated |
type |
a string indicating the type of descriptive to be generated. The possible values are "categorical","binary","continuous" with default being categorical. For binary, all the variables must have only 0 and 1 as possible values |
strata |
a list of vectors consisting of the names of the stratification variables. The variables in a vector will be stratified in the order given. |
strata_label |
The label for the strata variables. The size should be as same as that of the strata |
numeric_summary |
Only applicable to type="continuous". The summary functions can be mentioned as a string seperated by '+' |
percent |
Applicable to type "categorical" and "binary". It helps in generating percentage frequency of the variable. The possible values are "col","row" and "null". If unspecified there will be no percentage stats in the output |
vars_label |
The label for the "vars" The size should be as same as that of the strata |
test |
a string denoting the test which has to be conducted for calculating the p value |
A list with descriptive table and other input parameters
Nivesh Elangovanraaj, kenivesh@gmail.com
The function is built on the top of a package named "tables" [tables::tabular()]
1 | descriptive(ADS,vars=c("country","race"),percent="col")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.