tableone: Exports the table 1 in a word file

Description Usage Arguments Author(s)

Description

Exports the table 1 in a word file

Usage

1
2
3
4
5
tableone(import.col.names, output.var.names, dichotomous = c(),
  ordinal = c(), median.iqr = c(), group.col.name, control.value,
  treatment.value, data = NULL, excel.path = NULL,
  export.path = NULL, sheet = NULL, tableone.col.names = NULL,
  export.filename = NULL, show.stats = NULL, export.word = TRUE)

Arguments

import.col.names

(Character) the column names as specifed in the imported data.frame or excel file.

output.var.names

(Character) the variable names as they will be displayed in the output. If not specified we will use the excel column names.

dichotomous

(Character) a vector of character values that specifies which of the excel columns contain dichotomous data.

ordinal

(Character) a vector of character values that specifies which of the excel columns contain ordinal data.

median.iqr

(Character) a vector of character values that specifies for which continuous excel columns we should calculate median and iqr instead of mean and sd.

group.col.name

(Character) the column name that specifies the group (control or treatment).

control.value

(Character) the value that specifies the control group. (e.g. 0 or 'control').

treatment.value

(Character) the value that specifies the treatment group (e.g. 1 or 'treatment').

data

(data.frame) (optional) (default: NULL) the data in a data.frame format that will be loaded. If you do not provide data, a pop up window will be displayed asking for an excel file to load data from.

excel.path

(Character) (optional) the path that the excel file can be read from. By default it is set to NULL so that a pop up window will ask for the path.

export.path

(Character) (optional) the path that the Word Document will be exported to.

sheet

(Character) (optional) (default: NULL) the sheet inside excel file that the data are stored. By default it gets the first one.

tableone.col.names

(Character) (optional) a vector for the column names of the exported table. Default are: c('Variable', 'Treatment Group', 'Control Group', 'p-value', 'Mean Difference', 'OR', 'Test Stat.')

export.filename

(Character) (optional) the name of the file that will be exported. Do not include the .docx extension. (default filename is TableOne.docx)

show.stats

(Character) (optional) a vector of characters that specifies which statistics will be displayed in the produced table One. By default it displays the MD, OR and Test Stat. value as additional statistics except from p-value

export.word

(Boolean) (optional) (default: TRUE) specify if you want to have a Word Document that contains the table one exported. Whether you export the table to Word or not, you will also get the results in a data.frame format after running the package.

Author(s)

Agapios Panos <panosagapios@gmail.com>


agapiospanos/TableOne documentation built on June 19, 2019, 2:46 p.m.