mirror of
https://github.com/agdamsbo/REDCapCAST.git
synced 2024-11-25 14:21:54 +01:00
Merge branch 'master' of github.com:SpectrumHealthResearch/REDCapRITS
This commit is contained in:
commit
3bcc7f9482
@ -52,7 +52,7 @@ records, so no pre-processing of metadata csv is needed.
|
||||
THIS LINE:
|
||||
```format redcap_repeat_instrument redcap_repeat_instrument_.;```
|
||||
1. Run the RECapRITS macro definitions in the source editor or using `%include`.
|
||||
1. Run the macro call `%REDCAP_READ_DATA_DICT()` to load the data dictionry into your SAS session, pointing to the file location of your REDCap data dictionary.
|
||||
1. Run the macro call `%REDCAP_READ_DATA_DICT()` to load the data dictionary into your SAS session, pointing to the file location of your REDCap data dictionary.
|
||||
1. Run the macro call `%REDCAP_SPLIT()`. You will have an output dataset for
|
||||
your main table as well as for each repeating instrument.
|
||||
|
||||
|
@ -4,8 +4,8 @@
|
||||
#' and give individual tables for each repeating instrument. Metadata
|
||||
#' is used to determine which fields should be included in each resultant table.
|
||||
#'
|
||||
#' @param records data.frame containing the records
|
||||
#' @param metadata data.frame containing the metadata
|
||||
#' @param records \code{data.frame} containing project records
|
||||
#' @param metadata \code{data.frame} containing project metadata (the data dictionary)
|
||||
#' @author Paul W. Egeler, M.S., GStat
|
||||
#' @examples
|
||||
#' \dontrun{
|
||||
@ -29,9 +29,11 @@
|
||||
#' returnFormat = 'json'
|
||||
#' )
|
||||
#'
|
||||
#' # Convert JSON to data.frames
|
||||
#' records <- fromJSON(result.record)
|
||||
#' metadata <- fromJSON(result.meta)
|
||||
#'
|
||||
#' # Split the data.frame into a list of data.frames
|
||||
#' REDCap_split(records, metadata)
|
||||
#' }
|
||||
#' @return a list of data.frames
|
||||
|
@ -21,13 +21,13 @@
|
||||
* format redcap_repeat_instrument redcap_repeat_instrument_.;
|
||||
*
|
||||
* 2. Download the data dictionary for your project.
|
||||
|
||||
*
|
||||
* 3. Run the macro definitions REDCAP_READ_DATA_DICT and REDCAP_SPLIT
|
||||
*
|
||||
* 3. Run the macro call for REDCAP_READ_DATA_DICT to load in the data dictionry.
|
||||
* 4. Run the macro call for REDCAP_READ_DATA_DICT to load in the data dictionry.
|
||||
* This is necessary to split the tables correctly.
|
||||
*
|
||||
* 4. Run the macro call for REDCAP_SPLIT. You will have an output dataset for
|
||||
* 5. Run the macro call for REDCAP_SPLIT. You will have an output dataset for
|
||||
* your main table as well as for each repeating instrument.
|
||||
*
|
||||
********************************************************************************/
|
||||
@ -44,7 +44,7 @@
|
||||
|
||||
IF FIELD_TYPE EQ "descriptive" THEN DELETE;
|
||||
|
||||
DROP SECTION_HEADER X1-X14;
|
||||
DROP SECTION_HEADER FIELD_TYPE X1-X14;
|
||||
|
||||
RUN;
|
||||
|
||||
@ -53,7 +53,7 @@
|
||||
|
||||
%MACRO REDCAP_SPLIT(
|
||||
DATA_DICTIONARY = REDCAP_DATA_DICTIONARY /* The name of the SAS dataset of the data dictionary */,
|
||||
DATA_SET = REDCAP/* The name of the SAS dataset created by REDCap */,
|
||||
DATA_SET = REDCAP /* The name of the SAS dataset created by REDCap */,
|
||||
KEY = RECORD_ID /* Variable that links base table with other tables */
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user