You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In REDCap we've got a project with ~700 records which were initially imported about a year ago. However, they were imported with incorrectly formatted recordIDs, without leading zero's. So the record ids are for example 1, 2, 3 etc instead of 001, 002, 003. This wasn't a problem before but now we are trying to merge data with another system and it would really be easier if they're formatted correctly, so with the leading zeros.
REDCap has an API for renaming records, see <Your Redcap env>/redcap/api/help/?content=rename_record and this would be ideal for updating all the recordIDs using an R script. So read a csv and call the API instead of doing >700 records by hand in the REDCap web application.
However, as far as I can see this API is not available as a function in the REDCapR library, is that correct? I couldn't find the rename record function (possible there are other API functions missing as well)
(REDCapR v1.1.0)
The text was updated successfully, but these errors were encountered:
It's a little clunky because the redcapAPI::renameRecord is not vectorized and the result is hard to interpret when the rename is partial. My hacks with purrr::map2_lgl and bind_cols ease those pain points.
Kudos on using ENV variables to keep your api key out of code. We recently added some ENV searching to unlockREDCap as well (now it works with ENV, yaml, and an interactive key locker).
In REDCap we've got a project with ~700 records which were initially imported about a year ago. However, they were imported with incorrectly formatted recordIDs, without leading zero's. So the record ids are for example
1
,2
,3
etc instead of001
,002
,003
. This wasn't a problem before but now we are trying to merge data with another system and it would really be easier if they're formatted correctly, so with the leading zeros.REDCap has an API for renaming records, see
<Your Redcap env>/redcap/api/help/?content=rename_record
and this would be ideal for updating all the recordIDs using an R script. So read a csv and call the API instead of doing >700 records by hand in the REDCap web application.However, as far as I can see this API is not available as a function in the REDCapR library, is that correct? I couldn't find the rename record function (possible there are other API functions missing as well)
(REDCapR v1.1.0)
The text was updated successfully, but these errors were encountered: