From 9d9a6dce2c175d012b6082aee9485cb912cd26e2 Mon Sep 17 00:00:00 2001 From: AG Damsbo Date: Mon, 5 Jun 2023 08:35:34 +0200 Subject: [PATCH] getwd/setwd fix, examples revision upcoming --- R/REDCap_split.r | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/R/REDCap_split.r b/R/REDCap_split.r index 5bd5b04..fd67cd0 100644 --- a/R/REDCap_split.r +++ b/R/REDCap_split.r @@ -58,17 +58,19 @@ #' #' # You must set the working directory first since the REDCap data export #' # script contains relative file references. +#' old <- getwd() #' 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") #' -#' # Get the metadata +#' # Get the metadatan #' metadata <- read.csv("ExampleProject_DataDictionary_2018-06-03.csv") #' #' # Split the tables #' REDCapRITS::REDCap_split(data, metadata) +#' setwd(old) #' } #' @return A list of \code{"data.frame"}s. The number of tables will differ #' depending on the \code{forms} option selected.