Code Monkey home page Code Monkey logo

redcapexporter's Introduction

REDCapExporter

R-CMD-check codecov CRAN_Status_Badge CRAN RStudio mirror downloads CRAN RStudio mirror downloads

Download the data from a REDCap project and package the data into a useful R data package.

Project Goals

While REDCap (Research Electronic Data Capture) is a fantastic tool for data capture, the dissemination of the collected data in a format that multiple data analysis can easily access and share can be improved. The REDCapExporter package provides a set of tools to provide easy access to REDCap data via the REDCap API with two aims:

  1. Scripting functions to allow for easy access to, and formatting of, a data set within a REDCap project.
  2. Produce a skeleton R data package to house, document, archive, and disseminate a data set.

Why is this tool needed?

If you are familiar with REDCap then you know that exporting the data from the web interface is straight forward, easy to use, and powerful. However, there is a fair amount of (meta) data that could be valuable to data analysis which is not included in the export. The REDCapExporter aims to report and cross link the meta data, collected data, and (expanded) documentation in one location. The resulting .tar.gz data package is easy to disseminate.

Version control of data is difficult. Small data files can easily be added to git repositories, and larger files using git-lfs. Subversion can handle larger data sets with its own pros and cons. However, adding the data to multiple repositories will consume a lot of disk space unnecessarily and there are issues arising from sensitive data being versioned and while using public repository hosts. A R data package will provide an implicit versioning of data while keeping only one copy of the data on the local disk.

redcapexporter's People

Contributors

dewittpe avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

redcapexporter's Issues

Set up Static Vignette

because the vignette will use the ucdenver REDCap API, a token, and one of my ssh keys, it is not reasonable to have the vignette built dynamically via R CMD BUILD. Use the same static vignette set up you used for the ensr package.

Build a project template vignette

This vignette will be added to the generated R package to summarize the project. This should include the checkmate script (see #4) applied to the meta data, summary of the users.

Branching Logic Flow Chart

Idea for a feature:

download the data dictionary and build a flowchart for the order the questions will be shown to the user in. Include the branching logic in the construction of this flow chart.

SSL protocol error ... 443 on Windows

@aljensen89 reported an error on windows for a project using REDCapExporter.

Error: Unknown SSL protocol error in connection to redcap.ucdenver.edu:443

I have reproduced the error and run some tests and believe the issue comes from using RCurl to make the calls to the REDCap API. Consider using the curl or httr package instead.

devtools::check() in vignette causes R CMD check to fail.

For some reason having the devtools::check in the export vignette results in a R CMD check --as-cran failure, but R CMD check will pass.

To reproduce the error:

git checkout 6c88ae3
make check          # Status Ok
make check-as-cran  # Status 1 Warning, 1 Note

The warning is:

* checking re-building of vignette outputs ... WARNING
Error(s) in re-building vignettes:
  ...
--- re-building ‘api.Rmd’ using rmarkdown
--- finished re-building ‘api.Rmd’

--- re-building ‘export.Rmd’ using rmarkdown
Quitting from lines 128-130 (export.Rmd) 
Error: processing vignette 'export.Rmd' failed with diagnostics:
R CMD check found WARNINGs
--- failed re-building ‘export.Rmd’

SUMMARY: processing the following file failed:
  ‘export.Rmd’

Error: Vignette re-building failed.
Execution halted

The lines causing the issue:

head -n 130 vignettes/export.Rmd 
  ```{r warning = FALSE}
  check <- devtools::check(pkg = prj_dir, quiet = TRUE, cran = FALSE)
  check
  ```

warning messages for S4 classes in data.tables

when format_record is asked to return a data.table I have a check in place to look for S4 classes. If any S4 columns exist a warning message is given to the user. There can be several different issues that arise with respect to S4 columns in a data.table. This is not a REDCapExporter issue per se, the "best" solution will need to come with updates to data.table. However, the warning message and tracking and resolution of this issue here is needed.

Rdatatable/data.table#4315

Support XML

When exporting from REDCap you can have the download in XML format. This format will likely have richer data than the csv or json exports. Add the xml format support to the export tools.

col-types

Verify all col-types are accounted for in col-type.R

Vignette Reorg

Feedback from presenting the initial work to the REDCap admins at UCD on the 12th of March 2019:

I buried the lead in the vignette. I need to move the primary function to the top of the vignette and provide additional details after the primary function use is shown.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.