ch.getDemographics | R Documentation |
Function that calculates summary statistics for demographic data.
ch.getDemographics(
data,
subjectColumn,
ageColumn = NULL,
sexColumn = NULL,
genderColumn = NULL,
ethnicityColumn = NULL,
outputFileName = "demographics.txt",
append = F,
roundValue = 2
)
data |
A dataframe with the demographic information. It needs - at minimum - a subject column and one other of the specified columns. |
subjectColumn |
A string specifying the column of data that holds the subject identifier. |
ageColumn |
A string specifying the column of data that holds the age information. DEFAULT = NULL. |
sexColumn |
A string specifying the column of data that holds the sex information. DEFAULT = NULL. |
genderColumn |
A string specifying the column of data that holds the gender information. DEFAULT = NULL. |
ethnicityColumn |
A string specifying the column of data that holds the ethnicity information. DEFAULT = NULL. |
outputFileName |
A sting specifying the name of the output file that will contain the summary statistics. Default is "demographics.txt". |
append |
A boolean specifying whether to append to end of an existing file or to overwrite any existing file with the same name. DEFAULT = FALSE (overwrite). |
roundValue |
An integer that specifies how many digits the output should be rounded to. DEFAULT = 2. ' |
nothing - a text file is saved.
ch.getDemographics (data, "sn", "age", genderColumn = "gender",outputFileName = "output.txt", append = T)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.