Description Usage Arguments Details Examples
View source: R/Table1_functions.R
Creates no. and percentage for each level of the variable, with a p-value from Chi-square test or Fisher's exact test.
1 |
Variable |
An R object. Categorical variable of interest. |
Group |
An R object. Group variable. |
Margin |
a vector giving the desired margin to calculate percentages in the table for each group. 1 indicates rows, 2 indicates columns. |
Can handle >1 group; number of columns will adjust automatically.
Test based on expected cell value <5. Will only return row for last level of the factor.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.