Learn R Programming

cards (version 0.5.1)

.detect_msgs: 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, ...)

Value

a data frame

Arguments

x

(data.frame)
a data frame

...

(dynamic-dots)
columns to search within

Examples

Run this code
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")

Run the code above in your browser using DataLab