set_overleaf_project.RdSet or reset the Overleaf project location
set_overleaf_project(project = NULL)The full path to the selected Overleaf project folder, invisibly.
This function lets you choose which Overleaf project to save charts
to when using grattan_save_overleaf(). The setting is stored as an
environment variable for the current R session only.
If you don't provide a project, you'll see a menu of available Overleaf projects to choose from. If you provide a project name or fragment, it will search for matching projects (case-insensitive). If you provide a full file path, it will use that path directly.
Since this setting only persists for the current R session, we recommend
calling set_overleaf_project() at the beginning of your script, or
in a project setup script or .Renv file, to improve reproducibility.
if (FALSE) { # \dontrun{
# Prompt to select from available projects
set_overleaf_project()
# Search for a project by name fragment
set_overleaf_project("Orange") # Finds "Orange-Book-2025"
# Use exact project name
set_overleaf_project("Orange-Book-2025")
# Manually set a specific project path
set_overleaf_project("/Users/you/Dropbox/yourname/Apps/Overleaf/My Report")
# Call at the start of your script for reproducibility
set_overleaf_project("transport-report")
# ... rest of your script
} # }