Skip to contents

Updates the REDCap database (project object) by fetching the latest data from the REDCap server.

Usage

sync_project(
  project,
  reset = FALSE,
  silent = FALSE,
  summarize = TRUE,
  save_to_dir = TRUE
)

Arguments

project

A validated project object containing REDCap project data and settings. Generated using load_project or setup_project

reset

Logical that forces a fresh update if TRUE. Default is FALSE.

silent

Logical (TRUE/FALSE). For messages.

summarize

Logical (TRUE/FALSE). If TRUE, summarizes data to directory.

save_to_dir

Logical (TRUE/FALSE). If TRUE, saves the updated data to the directory. Default is TRUE.

Value

Messages for confirmation.

Details

This function updates the REDCap database by fetching the latest data from the REDCap server. It supports various options such as forcing a fresh update, checking logs for a specified number of days, and retrieving files from REDCap. The function can also handle metadata-only updates and batch processing.

See also

setup_project for initializing the project object.

Other db_functions: rmarkdown_project()