tbl_summary: tbl_summary

View source: R/tbl_summary.R

tbl_summaryR Documentation

tbl_summary

Description

Gets the number of distinct values in a dataset and total number of observations per column.

Usage

tbl_summary(x, .prop = FALSE)

Arguments

x

Dataset.

.prop

Logical determining whether output should transform the count of distinct and total observations for each column into a proportion of the dataset's total size.

Value

A dataframe with the number of distinct observations and total observations per column.

Examples

tibble::tibble(a = c('A','B', NA),
               b = c(1.2, 1.2, 1.2),
               c = c(4.5, NA, NA)) %>%
 tbl_summary(.prop = TRUE)


toddellis/miao documentation built on June 1, 2025, 10:11 p.m.