Closed NikNakk closed 2 years ago
Yep. Try to run importRecords()
with a redcap field that is defined as Text Box and Validation set to "Number". If your input dataset has missing data, I get the following error:
Error: Assigned data `""` must be compatible with existing data.
ℹ Error occurred for column `<name>`.
x Can't convert <character> to <double>.
Hi @baderstine, I got the same error before. I was using a list of record id from a xlsx file to export data from redcap, attach new record id from the same excel file, and then import into another redcap project. When importing records, I got the same error massage. I changed xlsx file to a csv file, and then was able to import records successfully.
@MBeresf4d That sounds like a different issue. There are no CSV or XLSX files involved in calling the importRecords()
function via the redcapAPI
package.
The existing code breaks when importing records that include numeric or integer columns that contain NAs.