- using R Under development (unstable) (2026-02-11 r89395)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
gcc (GCC) 15.1.1 20250521 (Red Hat 15.1.1-2)
GNU Fortran (GCC) 15.1.1 20250521 (Red Hat 15.1.1-2)
- running under: Fedora Linux 42 (Workstation Edition)
- using session charset: UTF-8
* current time: 2026-02-11 06:07:50 UTC
- using option ‘--no-stop-on-test-error’
- checking for file ‘REDCapExporter/DESCRIPTION’ ... OK
- this is package ‘REDCapExporter’ version ‘0.3.2’
- package encoding: UTF-8
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for executable files ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking whether package ‘REDCapExporter’ can be installed ... OK
See the install log for details.
- checking package directory ... OK
- checking ‘build’ directory ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... OK
- checking whether the package can be loaded with stated dependencies ... OK
- checking whether the package can be unloaded cleanly ... OK
- checking whether the namespace can be loaded with stated dependencies ... OK
- checking whether the namespace can be unloaded cleanly ... OK
- checking loading without being on the library search path ... OK
- checking whether startup messages can be suppressed ... OK
- checking use of S3 registration ... OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [6s/20s] OK
- checking Rd files ... OK
- checking Rd metadata ... OK
- checking Rd line widths ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking contents of ‘data’ directory ... OK
- checking data for non-ASCII characters ... OK
- checking LazyData ... OK
- checking data for ASCII and uncompressed saves ... OK
- checking installed files from ‘inst/doc’ ... OK
- checking files in ‘vignettes’ ... OK
- checking examples ... OK
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [9s/14s] ERROR
Running ‘test-as.data.frame.R’
Running ‘test-build_r_pkg.R’
Running ‘test-export.R’
Running ‘test-format_record.R’
Running ‘test-keyring.R’
Running the tests in ‘tests/test-export.R’ failed.
Complete output:
> library(REDCapExporter)
>
> # Tests rely on publicly available REDCap and tokens published
> # https://github.com/redcap-tools/redcap-test-datasets/tree/master
>
> # project_name token server_url pid server read_only operational notes
> # archer 9A81268476645C4E5F03428B8AC3AA7B https://bbmc.ouhsc.edu/redcap/api/ 153 oklahoma-bbmc TRUE TRUE simple structure; read-only
> # archer D70F9ACD1EDD6F151C6EA78683944E98 https://bbmc.ouhsc.edu/redcap/api/ 213 oklahoma-bbmc FALSE TRUE simple structure; read & write
> # archer 0434F0E9CF53ED0587847AB6E51DE762 https://bbmc.ouhsc.edu/redcap/api/ 212 oklahoma-bbmc TRUE TRUE longitudinal structure; read-only
> # archer D72C6485B52FE9F75D27B696977FBA43 https://bbmc.ouhsc.edu/redcap/api/ 268 oklahoma-bbmc TRUE TRUE Russian characters; read-only
>
> archer01_csv <-
+ tryCatch(
+ export_core(uri = 'https://bbmc.ouhsc.edu/redcap/api/', token = '9A81268476645C4E5F03428B8AC3AA7B'),
+ error = function(e) {e}
+ )
Getting Project Info
Getting project metadata
Getting user data
Getting project record
>
> Sys.setenv("REDCap_API_URI" = 'https://bbmc.ouhsc.edu/redcap/api/')
> Sys.setenv("REDCap_API_TOKEN" = '9A81268476645C4E5F03428B8AC3AA7B')
> archer01_json <- tryCatch(export_core(format = "json"), error = function(e) {e})
Getting Project Info
Getting project metadata
Getting user data
Getting project record
>
> if (inherits(archer01_csv, "error") | inherits(archer01_json, "error")) {
+ if (inherits(archer01_csv, "curl_error") | inherits(archer01_json, "curl_error")) {
+ # skip the rest of the testing
+ print(sprintf("Skip test-export.R after curl error: %s", archer01_csv$message))
+ } else {
+ stop("in test-export.R an non curl related error occured when initially calling export_core")
+ }
+ } else {
+
+ stopifnot(
+ inherits(archer01_csv, "rcer_rccore"),
+ inherits(archer01_json, "rcer_rccore"),
+ inherits(archer01_csv$project_raw, "rcer_raw_project"),
+ inherits(archer01_json$project_raw, "rcer_raw_project"),
+ inherits(archer01_csv$metadata_raw, "rcer_raw_metadata"),
+ inherits(archer01_json$metadata_raw, "rcer_raw_metadata"),
+ inherits(archer01_csv$project_raw, "rcer_raw_project"),
+ inherits(archer01_json$project_raw, "rcer_raw_project"),
+ inherits(archer01_csv$record_raw, "rcer_raw_record"),
+ inherits(archer01_json$record_raw, "rcer_raw_record"),
+ grepl("text/csv", attr(archer01_csv$record_raw, "Content-Type")),
+ grepl("application/json", attr(archer01_json$record_raw, "Content-Type"))
+ )
+
+ a1 <- format_record(archer01_csv)
+ a2 <- format_record(archer01_json)
+
+ # apparently the end of line characters are exported differently
+ a1$address <- gsub('\n', ' ', gsub('\r', '', a1$address))
+ a2$address <- gsub('\n', ' ', gsub('\r', '', a2$address))
+ a1$comments <- gsub('\n', ' ', gsub('\r', '', a1$comments))
+ a2$comments <- gsub('\n', ' ', gsub('\r', '', a2$comments))
+
+ stopifnot(isTRUE(all.equal(a1, a2)))
+
+ }
Error in `$<-.data.frame`(`*tmp*`, address, value = character(0)) :
replacement has 0 rows, data has 1
Calls: $<- -> $<-.data.frame
Execution halted
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [35s/38s] OK
- checking PDF version of manual ... OK
- checking HTML version of manual ... OK
- checking for non-standard things in the check directory ... OK
- checking for detritus in the temp directory ... OK
- DONE
Status: 1 ERROR