caa2021_Rpackage_workshop
caa2021_Rpackage_workshop copied to clipboard
This workshop, organised on behalf of the CAA-SIG "Scientific Scripting Languages in Archaeology", offers a low-level introduction to R package development for users with basic R-skills
Developing R Packages
This workshop by the CAA–SIG Scientific Scripting Languages in Archaeology given at CAA2021, Cyprus offers a low-level introduction to R package development. The workshop was complementary to the session Tools for the Revolution: developing packages for scientific programming in archaeology at the conference.
The slides are available as .pdf in rendered_slides
.
What this workshop covers
In this workshop we focused on the main points in Hadley Wickham's book on package development (Wickham 2020) and created an example application together. Workshop attendees will get to know a structured workflow, which will aid them in organizing their personal scripts afterwards. Main topics include function definition in R, the R package structure and the typical package development cycle. If time allows, we will also introduce topics like vignettes, unit tests or shipping data with packages.
What you need to code along
Basic R knowledge is strongly recommended. Beyond that you need the following software on the computer you use to participate in the workshop:
- R
- RStudio Desktop
- For Windows users: Rtools
To test if your R setup is ready for package development, you can try to install a package from Github.
if(!require('remotes')) install.packages('remotes')
remotes::install_github("r-lib/devtools")
Devtools is also the main package we will need for the workshop.