Skip to content

Commit

Permalink
#10 adds check for already boolean outputs in yn_to_tf. If already lo…
Browse files Browse the repository at this point in the history
…gical just returns input
  • Loading branch information
statasaurus committed Nov 18, 2021
1 parent ec62d59 commit 9a60ed0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/spec_builder.R
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,8 @@ yn_to_tf <- function(x){
case_when(str_detect(x, "[Y|y]es") ~ TRUE,
str_detect(x, "[N|n]o") ~ FALSE,
is.na(x) ~ NA)
} else if(is.logical(x)){
x
} else {
warning("Keep column needs to be True or False, please correct before converting to a Metacore object",
call. = FALSE)
Expand Down

0 comments on commit 9a60ed0

Please sign in to comment.