dot-detect_msgs: Detect Columns with Non-Null Contents

.detect_msgsR Documentation

Detect Columns with Non-Null Contents

Description

Function looks for non-null contents in requested columns and notifies user before removal. Specifically used for detecting messages.

Usage

.detect_msgs(x, ...)

Arguments

x

(data.frame)
a data frame

...

(dynamic-dots)
columns to search within

Value

a data frame

Examples

ard <- ard_continuous(
  ADSL,
  by = ARM,
  variables = AGE,
  statistic = ~ list(
    mean = \(x) mean(x),
    mean_warning = \(x) {
      warning("warn1")
      warning("warn2")
      mean(x)
    },
    err_fn = \(x) stop("'tis an error")
  )
)

cards:::.detect_msgs(ard, "warning", "error")

cards documentation built on Oct. 4, 2024, 1:09 a.m.