crosstable: Cross Tables

View source: R/crosstable.h.R

crosstableR Documentation

Cross Tables

Description

Function for making Cross Tables.

Usage

crosstable(
  data,
  vars,
  group,
  sty = "nejm",
  excl = FALSE,
  cont = "mean",
  pcat = "chisq"
)

Arguments

data

The data as a data frame.

vars

The variable(s) that will appear as rows in the cross table.

group

The variable that will appear as columns (groups) in the table.

sty

.

excl

Exclude rows with missing values.

cont

.

pcat

.

Value

A results object containing:

results$todo a html
results$todo2 a html
results$tablestyle1 a html
results$tablestyle2 a html
results$tablestyle3 a html
results$tablestyle4 a html

Examples


# Example usage:
# dat <- as.data.frame(your_data)
# ClinicoPathDescriptives::crosstable(
#   data = dat,
#   vars = vars(YourRowVariable),
#   group = "YourGroupingVariable",
#   sty = "finalfit",
#   excl = TRUE,
#   cont = "mean",
#   pcat = "chisq",
#   exportCSV = TRUE
# )


sbalci/ClinicoPathJamoviModule documentation built on Feb. 25, 2025, 6:34 a.m.