## ----include = FALSE---------------------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>", eval = FALSE ) ## ----setup-------------------------------------------------------------------- # library(wrictools) ## ----eval = FALSE------------------------------------------------------------- # api_token <- 'YOUR_API_TOKEN' # Replace with your personal API token # api_url <- 'https://redcap.au.dk/api/' #change this url to your RedCAP url (e.g. 'https://redcap.wustl.edu/') # ## ----eval=FALSE--------------------------------------------------------------- # export_file_from_redcap(record_id = "12345", fieldname = "WRIC_raw") ## ----eval=FALSE--------------------------------------------------------------- # result <- preprocess_WRIC_files("./example_data/record_ids.csv", "WRIC_raw", # code = "id", save_csv = TRUE) # R1_metadata <- result$metadata$r1 # R2_metadata <- result$metadata$r2 # df_room1 <- result$dfs$room1 # df_room2 <- result$dfs$room2 ## ----eval=FALSE--------------------------------------------------------------- # upload_file_to_redcap(filepath = "./example_data/XXXX_WRIC_data.csv", # record_id = "12345", fieldname = "WRIC_processed")