Converted R code into a package

This commit is contained in:
pegeler 2018-06-03 16:08:26 -04:00
commit 50e0496d8c
11 changed files with 154 additions and 19 deletions

View file

@ -35,15 +35,21 @@ a solution to handle the problem in both SAS and R.
## Instructions
### R
The function definition file contains [roxygen2](https://cran.r-project.org/package=roxygen2) comments to assist you.
First you must install the package. To do so, execute the following in your R console:
```r
if (!require(devtools)) install.packages("devtools")
devtools::install_github("SpectrumHealthResearch/REDCapRITS/R")
```
After the package is installed, follow these instructions:
1. Run the function definition in the source editor or using `source()`.
1. Download the record dataset and metadata. This can
be accomplished either by traditional methods or using the API. The
`read.csv()` function should be able to handle newline characters within
records, so no pre-processing of metadata csv is needed.
1. Call the function, pointing it to your record dataset and metadata
`data.frame`s.
`data.frame`s or JSON character vectors.
### SAS