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

convert logicals to integers #305

Closed
wibeasley opened this issue Aug 20, 2020 · 0 comments
Closed

convert logicals to integers #305

wibeasley opened this issue Aug 20, 2020 · 0 comments
Assignees

Comments

@wibeasley
Copy link
Member

Add a parameter to redcap_write_oneshot() and redcap_write() called convert_logical_to_integer.

Any logical/boolean value will be converted to an integer, so it meshes well with T/F and Y/N items that are coded as 1/0 underneath. The default will be FALSE, so it doesn't break existing code.

Currently, our team uses code like this before uploading.

ds <- 
  ds %>%
  dplyr::mutate_if(is.logical, as.integer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant