Skip to contents

Fetch REDCap DB

Usage

fetch_redcap(
  .uri = get_redcap_uri(),
  .token = get_redcap_token(),
  forms = NULL
)

Arguments

.uri

(chr, default: get_redcap_uri()) The REDCap URI.

.token

(chr, default: get_redcap_token()) The REDCap token.

forms

(chr) vector of REDCap forms to fetch.

Value

(tbl_df) The REDCap DB.

Examples

# \donttest{
  fetch_redcap() |>
    str(1)
#> Error in REDCapTidieR::read_redcap(redcap_uri = .uri, token = .token,     forms = forms):  The token is an empty string, which is not allowed.
#>  API token: ``

  fetch_redcap(
    forms = c(
      "followup_postoperatorio_14_30_60_giorno_po",
      "visita_followup_postoperatorio_90_giorno_po"
    )
  ) |>
    str(1)
#> Error in REDCapTidieR::read_redcap(redcap_uri = .uri, token = .token,     forms = forms):  The token is an empty string, which is not allowed.
#>  API token: ``
# }