Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yn_to_tf() should function if input variable is already boolean #10

Closed
kodesiba opened this issue Oct 12, 2021 · 1 comment
Closed

yn_to_tf() should function if input variable is already boolean #10

kodesiba opened this issue Oct 12, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@kodesiba
Copy link

In spec_type_to_ds_vars() if the keep variable is already a boolean it causes a failure when attempting to build the ds_vars since yn_to_tf() is only looking for something that contains Yes/No

@kodesiba kodesiba added the bug Something isn't working label Oct 12, 2021
@kodesiba
Copy link
Author

library(tibble)
#> Warning: package 'tibble' was built under R version 4.0.5
library(metacore)

metadoc <- list("variables" = tribble(
   ~"dataset", ~"variable", ~"order", ~"keep", ~"key_seq", ~"core",
   "DM",       "STUDYID",   1,        TRUE,    1,         "Required",
   "DM",       "DOMAIN",    1,        TRUE,    NA,        "Required",
   "DM",       "USUBJID",   1,        TRUE,    2,         "Required",
))

ds_vars <- spec_type_to_ds_vars(metadoc,
                                key_seq_sep_sheet = FALSE,
                                sheet = "variables")
#> Warning: Keep column needs to be True or False, please correct before converting
#> to a Metacore object

statasaurus added a commit that referenced this issue Nov 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants