Description Usage Arguments Value Examples
View source: R/demographicTable.R
Produces a table of the distribution of demographic characteristics.
1 | demographicTable(hor_fact, ver_fact, count = TRUE, percent = TRUE, header = TRUE)
|
hor_fact |
factor constituting the columns of the table. |
ver_fact |
factor constituting the rows of the table. |
count |
logical value that toggles whether to include the absolute values in the table. |
percent |
logical value that toggles whether to include the values in percent in the table. |
header |
logical value that toggles whether to include a header for the row factor. |
A dataframe constituting the demographic table.
1 2 3 4 5 6 7 8 9 10 | data(mydata)
tab.1 <- demographicTable(mydata$sex, mydata$age_group7)
tab.1
tab.2 <- demographicTable(mydata$sex, mydata$age_group7, count=FALSE)
tab.2
tab.3 <- demographicTable(mydata$sex, mydata$age_group7, percent=FALSE)
tab.3
#saveTable(tab.1, "demographicTable.rtf")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.