Skip to content

convert logicals to integers #305

Closed
Closed
@wibeasley

Description

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions