Skip to content

Releases: agdamsbo/REDCapCAST

REDCapCAST 24.12.1

02 Dec 12:05
6223d20
Compare
Choose a tag to compare

This release attempts to solve problems hosting the shiny_cast app, while also implementing functions to preserve as much meta data as possible from the REDCap database when exporting data.

The hosting on shinyapps.io has given a lot of trouble recently. Modified package structure a little around the shiny_cast(), to accommodate an alternative hosting approach with all package functions included in a script instead of requiring the package.

  • NEW: A new option to raw_or_label in read_readcap_tables() has been added: "both". Get raw values with REDCap labels applied as labels. Use as_factor() to format factors with original labels and use the gtsummary package to easily get beautiful tables with original labels from REDCap. Use fct_drop() to drop empty levels.

  • NEW: fct_drop() has been added with an extension to forcats::fct_drop(), that works across data.frames. Use as fct_drop().

  • CHANGE: the default data export method of easy_redcap() has been changed to use the new labelled data export with read_readcap_tables().

REDCapCAST 24.11.3

25 Nov 12:29
4531508
Compare
Choose a tag to compare
  • BUG: shiny_cast() fails to load as I missed loading REDCapCAST library in ui.r. Fixed. Tests would be great.

REDCapCAST 24.10.3

03 Oct 08:46
7f74ea5
Compare
Choose a tag to compare

Updated links and spelling.

REDCapCAST 24.6.1

10 Jun 08:14
7bbdf9b
Compare
Choose a tag to compare

Functions

  • Fix: read_redcap_tables(): field names testing allows to include "[form_name]_complete" fields.

  • Fix: ds2dd_detailed(): default record ID name is now "record_id", the REDCap default. Default is still to use the first column name. Support was added to interpret column name prefix or suffix as instrument names. See the examples.

  • New: create_instrument_meta(): creates zip with instrument files to allow adding new instruments to project in production. Takes data dictionary as input and creates a zip for each instrument specified by the form_name column.

  • New: doc2dd(): function to convert document table to data dictionary. This allows to specify instrument or whole data dictionary in text document, which for most is easier to work with and easily modifiable. The generic case is a data frame with variable names as values in a column. This is a format like the REDCap data dictionary, but gives a few options for formatting. Has a few related functions for data handling and formatting. One interesting function is case_match_regex_list(), which allows for a dynamic dplyr::case_when()-like approach for regex-matching. I think it is neat at least.

Documentation and more

  • Dependencies: In order to deploy shiny_cast() with shinylive, I need to remove curl as a dependency. To accomplish this, the shiny_deploy() helper functions has been moved to the package project.aid. This was before realising that REDCapR has curl as dependency, which is the culprit. REDCapCAST is not going to be a shinylive web-app without removing REDCapR dependency or any other REDCap database interaction, which would defy the purpose. I'll stick to hosted Shiny app instead.

REDCapCAST 24.2.1

28 Feb 08:17
Compare
Choose a tag to compare

Functions

  • Fix: ds2dd(): uses correct default dd column names. Will be deprecated.

  • Fix: easy_redcap(): fixed to actually allow project naming. also specifically asks for uri. widening updated to work.

  • Fix: redcap_wider(): updated to accept more formats and allow handling of simple projects without repeating instruments and not longitudinal.

  • Fix: read_redcap_tables(): now handles non-longitudinal project without repeatable instruments.

  • NEW: ds2dd_detailed(): extension of the ds2dd(), which serves to preserve as much metadata as possible automatically. Depends on a group of helper functions also introduced. Of special note is the guess_time_only_filter(), which will try to guess which columns/variables should be formatted as time only formats. Supports hms time format. DETAILED INSTRUCTION AND VIGNETTE IS PENDING.

  • NEW: read_redcap_instrument(): convenience function to retrieve complete instrument. Goes a little against the focused approach. With REDCapR::redcap_read() you can specify a form to download. You have to also specify the record id variable though. This is done for you with read_redcap_instrument(). Nothing fancy.

  • NEW: shiny_cast(): Shiny application to ease the process of converting a spreadsheet/data set to a REDCap database. The app runs locally and data is transferred securely. You can just create and upload the data dictionary, but you can also transfer the given data in the same process. I plan to host the app with shinyapps.io, but for now you can run it locally.

Other

I believe renv has now been added and runs correctly. After clone, do renv::restore() to install all necessary package to modify the package. This seems to always be back and forth. renv may be on its way out again.

Added a Code of Conduct.

REDCapCAST 24.1.1

10 Jan 09:02
Compare
Choose a tag to compare

Functions

  • Fix: read_redcap_tables(): checking form names based on data dictionary to allow handling of non-longitudinal projects. Prints invalid form names and invalid event names. If invalid form names are supplied to REDCapR::redcap_read() (which is the backbone), all forms are exported, which is not what we want with a focused approach. Invalid event names will give an output with a rather peculiar formatting. Checking of field names validity is also added.

REDCapCAST 23.12.1

20 Dec 14:48
Compare
Choose a tag to compare

One new function to ease secure dataset retrieval and a few bug fixes.

Functions

  • New: easy_redcap() function to ease the retrieval of a dataset with read_redcap_tables() with keyring-package based key storage, which handles secure API set, storage and retrieval. Relies on a small helper function, get_api_key(), which wraps relevant keyring-functions. Includes option to cast the data in a wide format with flag widen.data.
  • Fix: REDCap_split(): when using this function on its own, supplying a data set with check boxes would fail if metadata is supplied as a tibble. Metadata is now converted to data.frame. Fixed.
  • Fix: read_redcap_tables(): fixed bug when supplying events.

REDCapCAST 23.6.2

04 Jul 14:09
Compare
Choose a tag to compare

This version marks the introduction of a few helper functions to handle database creation.

Functions

  • New: ds2dd() function migrating from the stRoke-package. Assists in building a data dictionary for REDCap from a dataset.

  • New: strsplitx() function to ease the string splitting as an extension of base::strsplit(). Inspiration from https://stackoverflow.com/a/11014253/21019325 and https://www.r-bloggers.com/2018/04/strsplit-but-keeping-the-delimiter/.

  • New: d2n() function converts single digits to written numbers. Used to sanitize variable and form names in REDCap database creation. For more universal number to word I would suggest english::word() or xfun::numbers_to_words(), though I have not been testing these.

REDCapCAST 23.6.1

07 Jun 11:53
Compare
Choose a tag to compare

Documentation:

  • Updated description.
  • Look! A hex icon!
  • Heading for CRAN.

First release on CRAN