vubiostat/redcap — pull request #1 by nutterb (2014-03-13 19:29:42+00:00)
Title: Changes to redcap package

I've been playing around with this for quite some time now and have what I think is a fairly stable working package. A brief summary of changes I've made:

in fieldToVar,
- I've expanded the field type that can be handled (I was getting errors for some REDCap field types).
- I've changed the way it handles checkboxes to accomodate non numeric checkbox codings
- fieldToVar will now convert date fields to POSIXct class when requested

importRecords was added to allow data to be imported to REDCap. This includes a validation process to determine if data can be uploaded and if it is within the validation ranges. Messages about the validation can be printed to a file or printed to the console.

included an option in .onLoad to set the API url as a global option (I sometimes grab multiple databases within a single script. This let's me set the url once and be done with it).

some functionality to prevent errors that occur when underscores are used in checkbox codings. This bug is fixed in REDCap 5.9.1, but the functions provided will allow the package to work with any version of REDCap.

function to change the coding from "Unchecked/Checked" to whatever you like. (this is a personal thing. I find "Unchecked/Checked" pretty unhelpful.

.Rd files for all the functions given

Let me know if there's anything you like. Thanks for a great framework to work with.

Benjamin