redcapAPI icon indicating copy to clipboard operation
redcapAPI copied to clipboard

importRecords() - Error in redcap_error(x, error_handling = "error") : 400:

Open andycressman opened this issue 6 years ago • 0 comments

Hi,

I'm having a newfound error (Error in redcap_error(x, error_handling = "error") : 400:) when trying to import an R data frame to a REDCap project using importRecords(). I have successfully imported other data in this way today, but I'm having problems here with the largest data frame (~17,000 records with ~400 variables, some of which are long character fields). Thanks in advance.

Code is below:

api_url <- "https://global.redcap.unc.edu/api/" api_key <- "[my token]" rcon <- redcapConnection(url=api_url, token=api_key)

df <-read.csv("[my file]")

importRecords(rcon, data=df, overwriteBehavior = c("normal"), returnContent = c("count"), returnData = F)

andycressman avatar Jul 09 '20 19:07 andycressman