These features are not yet on CRAN. Install with remotes::install_github("OuhscBbmc/REDCapR")

Possibly Breaking Change

These changes could possibly break existing code –but it’s very unlikely. We feel they will (directly and indirectly) improve the package considerably.

  • redcap_read(), redcap_read_oneshot(), redcap_dag_read(), redcap_log_read(), and redcap_report() return a tibble instead of a data.frame. (#415)

    This should affect client code only if you expect a call like ds[, 3] to return a vector instead of a single-column data.frame/tibble. One solution is to upcast the tibble to a data.frame (with something like as.data.frame()). We recommend using an approach that works for both data.frames and tibbles, such as ds[[3]] or dplyr::pull(ds, "gender").

    For more information, read the short chapter in R for Data Science.

  • The *_collapsed parameters are deprecated. When your want to limit on records/fields/forms/events, pass the vector of characters, not the scalar character separated by commas (which I think everyone does already). In other words use c("demographics", "blood_pressure") instead of "demographics,blood_pressure".

    Here are the relationships between the four pairs of variables:

    
    records_collapsed   <- collapse_vector(records  , records_collapsed)
    fields_collapsed    <- collapse_vector(fields   , fields_collapsed)
    forms_collapsed     <- collapse_vector(forms    , forms_collapsed)
    events_collapsed    <- collapse_vector(events   , events_collapsed)

    If someone is using the *_collapsed parameter, they can programmatically convert it to a vector like:

    
    field_names <- trimws(unlist(strsplit(field_names_collapsed, ",")))
  • redcap_read() will automatically include the “plumbing” variables, even if they’re not included the list of requested fields & forms. (#442). Specifically:

    • record_id (or it’s customized name) will always be returned
    • redcap_event_name will be returned for longitudinal projects
    • redcap_repeat_instrument and redcap_repeat_instance will be returned for projects with repeating instruments

This will help extract forms from longitudinal & repeating projects.

  • redcap_read() and redcap_read_oneshot() now return an empty dataset if no records are retrieved (such as no records meet the filter criteria). Currently a 0x0 tibble is returned, but that may change in the future. Until now an error was deliberately thrown. (#452)

New Features

Minor Enhancements

New Features

Minor Enhancements

Test Suite

  • Added two more dictionaries that are super wide -5k & 35k variables (#335 & #360, @januz & @datalorax)
  • Read, modify, & read projects with DAGs (#353, daniela.wolkersdorfer, #353)

The package has been stable for years and should be reflected in the major version number.

Minor Enhancements

Stability Features

  • update for newer version of testthat -v3.0.0 (#312)
  • update for newer version of readr 2.0.0 (#343)
  • update for newer version of readr 1.4.0 (#313)
  • update for newer version of REDCap on test server (#310)
  • save expected datasets as files -instead of included in the actual test code (#308)

Corrections & Bug Fixes

Breaking Changes (possible, but unlikely)

  • kernel_api() defaults to “text/csv” and UTF-8 encoding. Formerly, the function would decide on the content-type and encoding. More details are below in the ‘Stability Features’ subsection.

  • constant() no longer accepts simplify as an options. An integer vector is always returned. (#280)

New Features

Stability Features

  • httr::content() (which is inside kernel_api()) now processes the returned value as “text/csv”, by default. This should prevent strange characters from tricking the process as the internal variable raw_text is being formed. See the [httr::content()](https://httr.r-lib.org/reference/content.html) documentation for a list of possible values for thecontent_type` parameter. (Thanks to great debugging by @vortexing #269, @sybandrew #272, & @begavett, #290)

  • Similarly, kernel_api() now has an encoding parameter, which defaults to “UTF-8”. (#270)

Minor Enhancements

  • check for bad field names passed to the read records functions (#288)

Corrections

Minor New Features

Modified Internals

  • All interaction with the REDCap server goes through the new kernal_api() function, which uses the ‘httr’ and ‘curl’ packages underneath. Until now, each function called those packages directly. (#213)
  • When converting REDCap’s CSV to R’s data.frame, readr::read_csv() is used instead of utils::read.csv() (Issue #127).
  • updated to readr 1.2.0 (#200). This changed how some data variables were assigned a data types.
  • uses odbc package to retrieve credentials from the token server. Remove RODBC and RODBCext (#188). Thanks to @krlmlr for error checking advice in https://stackoverflow.com/a/50419403/1082435.
  • data.table::rbindlist() replaced by dplyr::bind_rows()
  • the checkmate package inspects most function parameters now (instead of testit::assert() and base:stop() ) (#190 & #208).
  • collapse_vector() is refactored and tested (#209)
  • remove dependency on pkgload package (#218)
  • Update Markdown syntax to new formatting problems (#253)

Deprecated Features

New Features

Bug Fixes

  • Adapted to new 2.4 version of curl (see #154)

New Features

  • Updated for Version 6.0.x of REDCap (which introduced a lot of improvements to API behavior).

New Features

New Features

Minor Updates

  • Test suite now uses testthat::skip_on_cran() before any call involving OUHSC’s REDCap server.
  • Vignette example of subsetting, conditioned on a second variable’s value.

New Features

Breaking Changes

  • The records_collapsed default empty value is now an empty string (i.e., "") instead of NULL. This applies when records_collapsed is either a parameter, or a returned value.

Updates

  • By default, the SSL certs come from the httr package. However, REDCapR will continue to maintain a copy in case httr’s version on CRAN gets out of date.
  • The tests are split into two collections: one that’s run by the CRAN checks, and the other run manually. Thanks, Gabor Csardi. Any test with a dependency outside the package code (especially the REDCap test projects) is run manually so changes to the test databases won’t affect the success of building the previous version on CRAN.
  • Corrected typo in redcap_download_file_oneshot() documentation, thanks to Andrew Peters (@ARPeters #45).

New Features

Updates

  • Renamed the former status_message to outcome_message. This is because the message associated with http code returned is conventionally called the ‘status messages’ (eg, OK, Forbidden, Not Found).
  • If an operation is successful, the raw_text value (which was formerly called raw_csv) is returned as an empty string to save RAM. It’s not really necessary with httr’s status message exposed.

Bug Fixes

  • Correct batch reads with longitudinal schema #27

New Features

Updates

New Features

  • Introduces redcap_read() and redcap_read_batch() with documentation
  • SSL verify peer by default, using cert file included in package
  • Initial submission to GitHub

Enhancements


GitHub Commits and Releases