redcap_import: Imports data into RedCap.

View source: R/redcap.R

redcap_importR Documentation

Imports data into RedCap.

Description

Imports data into RedCap.

Usage

redcap_import(
  df,
  import,
  redcap_uri = "https://redcap.rn.dk/api/",
  overwrite = "normal",
  ...
)

Arguments

df

tibble | Data frame to import into redcap. Supports data read using

  • read_labka()

  • read_ck18()

  • read_dxa()

  • read_p3np()

  • read_homa()

  • read_insulin()

  • read_timp1()

import

str | Selection of which data to import. Selections:

  • labka

  • ck18

  • dxa

  • p3np or piiinp

  • homa

  • insulin

  • timp1

  • lihep

redcap_uri

str | URL to redcap API. Defaults to RN server.

overwrite

str | Overwrite existing data on redcap or not. Selections:

  • normal

...

<dynamic-dots> Extra arguments.

Examples

# Read PIIINP data
df_p3np <- read_p3np()
redcap_import(df_p3np, import = "p3np")

# Read TIMP1 data
df_timp1 <- read_timp1()
redcap_import(df_timp1, import = "timp1")

# Read LABKA data
df_labka <- read_labka(path = "~/Documents/1 - Data/Multisite-Labka/lakba-export_2022-09-13.xlsx",
                      identifier = T)
redcap_import(df_labka, import = "labka")

# Read CK18
df_ck18 <- read_ck18()
redcap_import(df_ck18, import = "ck18")

# Read insulin
df_insulin <- read_insulin()
redcap_import(df_insulin, import = "insulin")

AndersAskeland/askelandR documentation built on Sept. 20, 2023, 10:39 a.m.