basetable: Create a baseline characteristics table

View source: R/basetable.R

basetableR Documentation

Create a baseline characteristics table

Description

This function create a baesline characteristics tables according to the variables included in a specific dataframe.

Usage

basetable(
  data,
  varlist,
  grvar = NULL,
  len.max = 5,
  y.correct = T,
  trend = F,
  gr.name = NULL,
  method = 3,
  combine = F,
  print.result = T,
  p_norm = 0.05
)

Arguments

data

Dataframe to be used

varlist

Vector of variables to be displayed

grvar

Grouping variable

len.max

Maximum number of elements to convert to factor

y.correct

a logical indicating whether to apply continuity correction

trend

a logical whether to do trend test

gr.name

Elements labels of grouping variables

method

Select between parametric, nonparametric or combined testing

combine

Display overall patient summary values as well

print.result

Print varClassifier result

p_norm

Cut-off p-value classifying normal and non-normal

Value

Dataframe of baseline characteristics table

Examples

basetable(data=mtcars, varlist=c("cyl", "mpg", "wt", "hp"), grvar="am")


nephroj/medutils documentation built on Feb. 3, 2024, 8:33 a.m.