qwickr.cat | R Documentation |
Run descriptive summaries for categorical data with the option to include hypothesis testing using the Chi Square test or Fisher's Exact test as appropriate.
qwickr.cat(x, outcomevar="", groupvar="", timevar="", specgroups=NULL, filesuffix="", t.title="", genpvalues=T, runpairwise=F, exportfile=c(), exportpath="")
x |
Data frame |
outcomevar |
Name of outcome variable |
groupvar |
Name of the group variable |
timevar |
Name of the time variable |
specgroups |
Do you want to compare a subset of groups within your dataset? Specify the group names here. For example, |
filesuffix |
A string to be appended to the name of the returned .csv or .doc file |
t.title |
Table title. Exported together with a dataframe of the output as a list. This list can then be exported to Word using the |
genpvalues |
Should a Chi Square or Fisher's Exact test be performed? |
runpairwise |
Run pairwise comparisons for each unique group pair? |
exportfile |
Export the output to file? Options: |
exportpath |
Path relative to the working directory where exported files will be saved e.g. "OUTPUT" Do not begin or end with a backslash. If left empty, file will be exported to the working directory. |
The function will automatically determine whether to use Chi Square or Fisher's Exact test based on the nature of the data.
Returns a data frame of counts and percentages for each study arm and an associated p-value for each study time point in a repeated measures design.
Abdul Malik Sulley <asulley@uwo.ca> May 7, 2020
stats::fisher.test(), q.write.to.word, utils::write.csv
group <- rep(c("A", "B"), 10) gender <- rep(c(1,1,0,0), 5) time <- rep(1, 10) df <- data.frame(group, gender, time) qwickr.cat(x=df, outcomevar="gender", groupvar = "group", timevar = "time")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.