From 6bf2a07c5aec297be359d24b41e1a1aa3adffa3a Mon Sep 17 00:00:00 2001 From: n-kall <33577035+n-kall@users.noreply.github.com> Date: Tue, 7 Jan 2025 15:29:11 +0200 Subject: [PATCH] don't allow variables to contain NA values --- R/variables.R | 3 +++ 1 file changed, 3 insertions(+) diff --git a/R/variables.R b/R/variables.R index 63d62cd..e0c732a 100644 --- a/R/variables.R +++ b/R/variables.R @@ -235,6 +235,9 @@ check_existing_variables <- function(variables, x, regex = FALSE, return(NULL) } + # do not allow NA values in variables + checkmate::assertCharacter(variables, any.missing = FALSE) + regex <- as_one_logical(regex) scalar <- as_one_logical(scalar) exclude <- as_one_logical(exclude)