table1: Table 1

View source: R/table1.R

table1R Documentation

Table 1

Description

Perform a table 1 like descriptive table

Usage

table1(
  DF,
  explicatives = columns(y),
  y = NULL,
  overall = TRUE,
  tests = "classic",
  strata = NULL,
  adjusted = NULL,
  mutation = 10,
  round = c(3, 2),
  exit = "console",
  num_function = "auto",
  available_data = TRUE,
  by_line = FALSE,
  complete = F
)

Arguments

DF

dataframe : data

explicatives

: (optionnal) columns of the dataframe to be analysed all the columns if let empty

y

character (optionnal) : column in DF to separate the table

overall

booleen (optionnal) : TRUE if an "overall" column is wanted

tests

character / vector (optionnal) : classical (student, khi2...) or logistic regression. Specify if paired.

strata

: columns with the number of the paires

mutation

numeric : number of modalities to display for one variable. If there is more than "mutation" categories, the modalities after this threeshold are wrapped into an "others" categorie.

round

(optionnal) : number of digits to be display in the results. If a vector is provided, digits stands for p-value then variables.

exit

character : 'html', 'console' or 'excel'

y_test

character (optionnal) : name of the column that will be used for statistical test

Value

dataframe, excel file or html table depending on the exit parameter


TanguyPerennec/AutostatR documentation built on Oct. 31, 2022, 7:57 a.m.