continuous_table: Produce a data frame to summaries continuous variables

View source: R/continuous_table.R

continuous_tableR Documentation

Produce a data frame to summaries continuous variables

Description

Takes a data frame and produces grouped or un-grouped summaries such as mean and standard deviation for continuous variables.

Usage

continuous_table(
  df = .,
  ...,
  group = .,
  time = .,
  total = TRUE,
  digits = 2,
  condense = FALSE
)

Arguments

df

Data frame

...

Variables to be summarised

group

Optional variable that defines the grouping

time

Optional variable for repeated measures (currently must me used with group)

total

Logical indicating whether a total column should be created

digits

Number of digits to the right of the decimal point

condense

should the variable and scoring columns in the output be condensed to one column?

Value

A tibble data frame summarising the data

Examples

    continuous_table(df = iris, Petal.Length, Petal.Width, group = Species)
    continuous_table(df = iris, Sepal.Length, Sepal.Width, group = Species,
                     total = FALSE)
    continuous_table(df = iris, Petal.Length, Sepal.Length, digits = 1)


EstherHerbert/Useful.functions documentation built on Jan. 31, 2025, 10:41 a.m.