Skip to contents

For every column: total N, observed N, % missing, median, Q1, Q3, min, max, SD, and flags HIGH_MISSINGNESS (above missing_threshold percent), ALL_MISSING, ZERO_SD_SENTINEL (a single repeated value) and SENTINEL_VALUES (more than 5% of values equal to a sentinel such as -9999). Mirror of Python Table2Generator.

Usage

generate_table2(
  data,
  table_name = NULL,
  columns = NULL,
  strata_col = NULL,
  missing_threshold = 50,
  sentinel_values = c(-9999, -999, 9999, 999999)
)

Arguments

data

Data frame, or a DBI connection with table_name.

table_name

Table to read when data is a connection.

columns

Columns to profile (default all).

strata_col

Optional column to profile within.

missing_threshold

Percent missing above which to flag.

sentinel_values

Values treated as missing-data sentinels.

Value

A data frame, one row per stratum and variable.