diff --git a/README.md b/README.md index e96aeee..6b0113f 100644 --- a/README.md +++ b/README.md @@ -229,16 +229,12 @@ REDCapRITS::REDCap_split(records, metadata) REDCapRITS also works with the data export script (a.k.a., *syntax file*) supplied by REDCap. Here is an example of its usage: ```r -# You must set the working directory first since the REDCap data export script -# contains relative file references. -setwd("/path/to/data/") - # Run the data export script supplied by REDCap. # This will create a data.frame of your records called 'data' -source("ExampleProject_R_2018-06-03_1700.r") +source("/path/to/data/ExampleProject_R_2018-06-03_1700.r", chdir = TRUE) # Get the metadata -metadata <- read.csv("ExampleProject_DataDictionary_2018-06-03.csv") +metadata <- read.csv("/path/to/metadata/ExampleProject_DataDictionary_2018-06-03.csv") # Split the tables REDCapRITS::REDCap_split(data, metadata)