Load both REDCapSync and RosyREDCap. You can click “Add New Project” in the top left of the shiny app. Altertenitively, you can setup projects in R using REDCapSync. See the page on storing tokens.
Launch the shiny app in your browser with …
# by default will launch in your browser
run_RosyREDCap()
# launch in pop out RStudio window
run_RosyREDCap(options = NULL)
# launch in RStudio Viewer
run_RosyREDCap(options = c(launch.browser = .rs.invokeShinyPaneViewer))
# launch in test_mode (built-in fake projects)
run_RosyREDCap(test_mode = FALSE)You can also use plot functions from the shiny app to make visuals in RStudio.
TEST_CLASSIC <- load_project("TEST_CLASSIC")
#> ! No cached projects... use `setup_project(...)`
#> ✔ Loaded TEST project TEST_CLASSIC!
#> ! Does not actually communicate with any REDCap API
TEST_CLASSIC |> REDCap_diagram()
load_project("TEST_REDCAPR_LONGITUDINAL") |>
REDCap_diagram(duplicate_forms = FALSE,
hierarchical = TRUE)
#> ! No cached projects... use `setup_project(...)`
#> ✔ Loaded TEST project TEST_REDCAPR_LONGITUDINAL!
#> ! Does not actually communicate with any REDCap APIAs more functions are developed they will be shared. Please reach out if you have ideas/suggestions
