Because rendering re-runs every chunk in order, it helps expose missing packages, undefined objects, and hidden dependencies that can make analyses difficult to reproduce. To support this, always load required packages within the document and avoid relying on objects created outside the document.
Making sure your Quarto document runs in any R Session:.
You can check whether these criteria are met by shutting down your R session completely, opening your Quarto document in a brand new R session, and pressing Render.