The redcapDM package has this tool and it would be a good enhancement to redcapAPI https://cran.r-project.org/web/packages/REDCapDM/vignettes/REDCapDM.html#rd_rlogic