ads
This commit is contained in:
parent
83bbcd5849
commit
7e3e24e195
12
side projects/ipto_calendar_import.R
Normal file
12
side projects/ipto_calendar_import.R
Normal 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
18
src/redcap_write_test.R
Normal 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
|
Loading…
Reference in New Issue
Block a user