Skip to content

Commit

Permalink
Allow NA values in logical fields when validating tabular data (#731)
Browse files Browse the repository at this point in the history
  • Loading branch information
kelliemac authored Apr 8, 2024
1 parent 50c3ba2 commit 66eb0bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lang/R/R/Interface.R
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ validate_tabular <- function(data, schema) {
logical_fields <- intersect(colnames(data), logical_fields)
if (length(logical_fields) > 0 ) {
for (log_field in logical_fields) {
not_logical <- data[[log_field]] %in% c(TRUE, FALSE) == FALSE
not_logical <- data[[log_field]] %in% c(TRUE, FALSE, NA) == FALSE
if (any(not_logical)) {
warning(paste("Warning:",log_field,"is not logical for row(s):",
paste(which(not_logical), collapse = ", ")))
Expand Down

0 comments on commit 66eb0bb

Please sign in to comment.