Hi! I'm new to R and trying to build the book locally to learn offline. When I run quarto render after cloning, I keep getting "package not found" errors and have to install them one by one:
quarto render → "no package called 'tidyverse'"
install.packages("tidyverse")
quarto render → "no package called 'nycflights13'"
install.packages("nycflights13")
- Repeat...
This is pretty frustrating as a beginner. Is this how it normally works?
Would it be possible to add a simple script like install-deps.R that installs all needed packages at once? Something like:
# install-deps.R
packages <- c("tidyverse", "nycflights13", "maps", "tidymodels")
for (pkg in packages) {
if (!requireNamespace(pkg, quietly = TRUE)) {
install.packages(pkg)
}
}
Or maybe just list all required packages in the README?
I'm happy to help make a PR if this would be useful! Just wondering if the current approach is intentional or if there's a better way.
Thanks!
Hi! I'm new to R and trying to build the book locally to learn offline. When I run
quarto renderafter cloning, I keep getting "package not found" errors and have to install them one by one:quarto render→ "no package called 'tidyverse'"install.packages("tidyverse")quarto render→ "no package called 'nycflights13'"install.packages("nycflights13")This is pretty frustrating as a beginner. Is this how it normally works?
Would it be possible to add a simple script like
install-deps.Rthat installs all needed packages at once? Something like:Or maybe just list all required packages in the README?
I'm happy to help make a PR if this would be useful! Just wondering if the current approach is intentional or if there's a better way.
Thanks!