warn_if_vars_exist | R Documentation |
Warn if a variable already exists inside a dataset
warn_if_vars_exist(dataset, vars)
dataset |
A
|
vars |
|
No return value, called for side effects
Function that provide users with custom warnings
suppress_warning()
,
warn_if_incomplete_dtc()
,
warn_if_inconsistent_list()
,
warn_if_invalid_dtc()
library(dplyr, warn.conflicts = FALSE)
dm <- tribble(
~USUBJID, ~ARM,
"01-701-1015", "Placebo",
"01-701-1016", "Placebo",
)
## No warning as `AAGE` doesn't exist in `dm`
warn_if_vars_exist(dm, "AAGE")
## Issues a warning
warn_if_vars_exist(dm, "ARM")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.