This commit is contained in:
AG Damsbo 2022-08-02 11:51:28 +02:00
parent 83bbcd5849
commit 7e3e24e195
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,12 @@
## IPTO import
library(readxl)
# Not possible to link to online file, and so the downloaded file is used.
dt<-read_xlsx("/Users/au301842/OneDrive/Research/PhD/Vejledning/IPTO_AGD.xlsx")
# To-dos
# - Export to calendar
# - Naming according to category
# - Dates and duration from file
# - Limit import to relevant rows/columns

18
src/redcap_write_test.R Normal file
View File

@ -0,0 +1,18 @@
## REDCap write testing
# Is it possible to write just a single line without
library(REDCapR)
library(dplyr)
uri <- "https://bbmc.ouhsc.edu/redcap/api/"
token <- "9A81268476645C4E5F03428B8AC3AA7B" # `UnitTestPhiFree` user and simple project (pid 153)
dta <- redcap_read_oneshot(
redcap_uri = uri,
token = token,
raw_or_label = "raw"
)$data %>% select(c("age","sex")) %>% mutate(sex=1)
sts<-redcap_write_oneshot(dta,uri,token) ## No access