rm_covsum: Returns a dataframe corresponding to a descriptive table The...

Description Usage Arguments Value See Also

View source: R/main.R

Description

Returns a dataframe corresponding to a descriptive table The default output is a kable table for use in pdfs or html, but pander tables can be produced for Word documents by specifying options('doc_type'='doc') in the setup chunk of the markdown document.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
rm_covsum(
  data,
  covs,
  maincov = NULL,
  digits = 1,
  caption = NULL,
  excludeLevels = NULL,
  showP = TRUE,
  showIQR = FALSE,
  showTests = FALSE,
  tableOnly = FALSE,
  covTitle = "Covariate",
  chunk_label,
  ...
)

Arguments

data

dataframe containing data

covs

character vector with the names of columns to include in table

maincov

covariate to stratify table by

digits

number of digits to round results to, defaults to 1

caption

character containing table caption

excludeLevels

a named list of levels to exclude in the form list(varname =c('level1','level2')) these levels will be excluded from association tests

showP

boolean indicating if p values should be displayed (may only want corrected p-values)

showIQR

boolean indicating if you want to display the inter quantile range (Q1,Q3) as opposed to (min,max) in the summary for continuous variables

showTests

boolean indicating if the type of statistical used should be shown in a column

tableOnly

should a dataframe or a formatted print object be returned

covTitle

character with the names of the covariate column

chunk_label

only used if options("doc_type"='doc') is set allow cross-referencing

...

other variables passed to covsum and the table output function

Value

A formatted table displaying a summary of the covariates stratified by maincov

See Also

fisher.test, chisq.test, wilcox.test, kruskal.test, and anova


Avery-Lisa/myReportRx documentation built on May 23, 2021, 2:30 a.m.