datacarpentry / r-raster-vector-geospatial

Introduction to Geospatial Raster and Vector Data with R
https://datacarpentry.org/r-raster-vector-geospatial
Other
113 stars 111 forks source link

Required Packages by Episode #401

Open drakeasberry opened 1 year ago

drakeasberry commented 1 year ago

We have various ways of stating the required R packages that need to be loaded in order to run the code that follows. It ranges from assuming the person has not restarted their R session from a previous episode, to describing (partially at times) in paragraph text to explicitly stating which packages are needed inside and r code block.

Would it be beneficial to create a consistent format where all required packages are listed explicitly in the THINGS YOU’LL NEED TO COMPLETE THIS EPISODE callout at the beginning of each episode?

This would seem to prevent difficulties if someone does not begin with episode 1 and continue working in the same R session. It would also prevent issues such as those described in #356 and #365.

Potential Example:

**Required R Packages:**  
Make sure that you have these packages loaded before running code in this episode.
```{r load-libraries-2, eval=FALSE}
library(terra)
library(ggplot2)
library(dplyr)
albhasan commented 1 year ago

Hi, I think this is a good idea, this would ensure that each episode runs independently of any other and could help self-paced lerners. Anyway the whole lesson isn't using more than 4 or 5 packages (sf, terra, dplyr, & ggplot2). Cheers!