class: center, middle, inverse, title-slide # Your first package ## Forwards Package Development module ###
Emma Rand ###
π
bit.ly/pkg-dev-3
--- layout: true <div class="my-footer"> <span> <a href="http://bit.ly/pkg-dev-3" target="_blank">π bit.ly/pkg-dev-3</a> </span> </div> <!-- Based on https://github.com/forwards/fwdbrand/blob/master/inst/rmarkdown/templates/xaringan/skeleton/skeleton.Rmd with module template added --> <!-- Instructions creating a new module--> <!-- Guiding principles for module design are here: ../README.md --> <!-- Edit Title, subtitle, Author and link --> <!-- Complete the sections in the module template and add your teaching material using the Format templates as a guide where needed --> --- class: middle, inverse # Overview --- ## Welcome! .pull-left[ .center[ <img src="images/emma-rand.png" width="45%" style="display: block; margin: auto;" /> Emma Rand .small[ Senior Lecturer (Prof) Department of Biology, University of York, UK ] ] ] .pull-right[ .center[ <img src="images/mine.jpg" width="45%" style="display: block; margin: auto;" /> Dr. Mine Γetinkaya-Rundel .small[ Senior lecturer (Prof) Department of Statistical Science at Duke University, USA Educator and Data Scientist at RStudio ] ] ] .center[ [Forwards](https://forwards.github.io/) Teaching Team Leads ] --- ## Summary This workshop walks you through making a minimal version controlled package linked to a remote repository on GitHub using the devtools approach. --- ## Module Prerequisites Before starting this module we will assume that you have - "[Packages in a nutshell](../01-packages-in-a-nutshell/packages-in-a-nutshell.html)" or equivalent experience - "[Setting up your system](../02-setting-up-system/setting-up-system.html)" or equivalent experience - the packages `devtools` and `assertthat` installed - R build toolchain: Rtools(windows) or XCode (mac) or r-base-dev - git installed, a GitHub account and verified they can talk to RStudio <!-- Here you list the prerequisites for instructors and learners. Most prerequisites should be references to other modules. You can include additional prerequisites but minimise the number and complexity of them. If there are many, consider writing a new module. --> ??? Add speaker notes What if you have not got R, RStudio, Rtools/xcode, Git installed? You can still code along using https://rstudio.cloud/. RStudio cloud is a browser based version of RStudio - it looks and works just like the desktop version You will need to set up an account but have 15 hrs / month for free devtools - needed today and irreplaceable assertthat - we use in the package we make. it would be possible to avoid using if installation is problematic for any reason If Git/GitHub set up has been tricky, you will still be able to do the majority of the workshop --- ## Be excellent to each other! π Please use the chat! π Be kind π Be respectful ??? Our intention is make time for asking questions. Please use the chat. We hope you will feel comfortable posting your questions 'To everyone' because that will help create a supportive learning space for all of us but if you feel more comfortable messaging me or Mine, that's fine. --- ## Learning Objectives At the end of this module the successful learner will be able to: - create a simple version-controlled package - explain the key components of a minimal package - use the package interactively with `devtools::load_all()` - link a local version controlled package to a remote repository on GitHub - use `check()` to execute R CMD check - populate `DESCRIPTION` and `LICENSE` files ??? Add speaker notes --- class: middle ## Create a package! --- ## Create a package! .tip[ Be deliberate about where you create your package. Do not nest inside another RStudio project, R package or git repo. ] ??? On our next slide, we will create a package on the Desktop. You may want to write a different path especially if you are working on a networked machine. --- ## Create a package! .your-turn[ Verify that you can create a package with: ] ```r usethis::create_package("~/Desktop/mypackage") ``` .tip[You may want to use a different path!] ??? You may want to use a different path. The usethis package is part of the devtools set of packages. devtools was previously a single package. it has not been reorganised into several packages. But installing devtools installs all of them https://www.tidyverse.org/blog/2018/10/devtools-2-0-0/ --- .small[ ``` β Creating 'C:/Users/er13/Desktop/mypackage/' β Setting active project to 'C:/Users/er13/Desktop/mypackage' β Creating 'R/' β Writing 'DESCRIPTION' Package: mypackage Title: What the Package Does (One Line, Title Case) Version: 0.0.0.9000 Authors@R (parsed): * First Last <first.last@example.com> [aut, cre] (YOUR-ORCID-ID) Description: What the package does (one paragraph). License: `use_mit_license()`, `use_gpl3_license()` or friends to pick a license Encoding: UTF-8 LazyData: true Roxygen: list(markdown = TRUE) RoxygenNote: 7.1.1 β Writing 'NAMESPACE' β Writing 'mypackage.Rproj' β Adding '.Rproj.user' to '.gitignore' β Adding '^mypackage\\.Rproj$', '^\\.Rproj\\.user$' to '.Rbuildignore' β Opening 'C:/Users/er13/Desktop/mypackage/' in new RStudio session β Setting active project to '<no active project>' ``` ] ??? Take a moment to examine the output. You can see that a folder, mypackage, has been created with an R/ folder and some files inside. You will be meeting these files today --- ## `create_package()` What happens when we run `create_package()`? - R will create a folder called `mypackage` which is a package and an RStudio project - restart R in the new project - create some infrastructure for your package - start the RStudio Build pane ??? We will look at some of this infrastructure on the next slide. You may find the Build pane has not appeared on the top right window. If you closed the Project and reopen it, it will probably appear. However, do not worry if it does not - the Build Pane provides some menu options for the commands that we will use but there is nothing that you can't do with a command. --- ## `create_package()` What happens when we run `create_package()`? - `mypackage.Rproj` is the file that makes this directory an RStudio Project. - `DESCRIPTION` provides metadata about your package. - The `R/` directory is where we will put `.R` files with function definitions. - `NAMESPACE` declares the functions your package exports for external use and the external functions your package imports from other packages. .right[....continued] ??? If you have used RStudio Projects before you will be familiar with the .RProj file DESCRIPTION - this is the file that makes the directory a package. We will need to edit this. --- ## `create_package()` What happens when we run `create_package()`? - `.Rbuildignore` lists files that we need but that should not be included when building the R package from source. - `.gitignore` anticipates Git usage and ignores some standard, behind-the-scenes files created by R and RStudio. ??? .Rbuildignore e.g., the `.Rproj` file See the linein the output: β Adding '^mypackage\\.Rproj$', '^\\.Rproj\\.user$' to '.Rbuildignore' --- ## What to put in it? Functions will go in an `.R` file. There's a `usethis` helper for adding `.R` files! ```r usethis::use_r("file_name") ``` -- `usethis::use_r()` adds the file extension (you don't need to). ??? What are we going to put in our package? The functions we make will go in .R script files that are in the R/ directory Putting each of the functions of a package in their own `.R` is a good place to start. As your package complexity increases, you might group related functions. Organize files so that related code lives together. If you can give a file a concise and informative name, it's probably about right. --- ## `usethis::use_r()` .your-turn[ Create a new R file in your package called `animal_sounds.R` ] -- ```r usethis::use_r("animal_sounds") ``` -- ```r β Setting active project to 'C:/Users/er13/Desktop/mypackage' β’ Modify 'R/animal_sounds.R' β’ Call `use_test()` to create a matching test file ``` ??? Add speaker notes --- ## `usethis::use_r()` .your-turn[ Create a new R file in your package called `animal_sounds.R` ] ```r usethis::use_r("animal_sounds") ``` ```r β Setting active project to 'C:/Users/er13/Desktop/mypackage' β’ Modify 'R/animal_sounds.R' *β’ Call `use_test()` to create a matching test file ``` ??? Ignore this line "Call `use_test()` to create a matching test file" for today. A later module will cover testing. --- ## Add the function .your-turn[ Put the following code into your script: ] ```r animal_sounds <- function(animal, sound) { assertthat::assert_that( assertthat::is.string(animal), assertthat::is.string(sound) ) paste0("The ", animal, " goes ", sound, "!") } ``` .footnote[.small[ We do not cover writing functions here but you can learn more in the Functions chapter of [R for Data Science](https://r4ds.had.co.nz/) <a name=cite-Wickham2017RDS3086927></a>([Wickham and Grolemund, 2017](#bib-Wickham2017RDS3086927)) ]] ??? This function takes two strings. using the `assertthat` package, it checks both inputs are strings and then prints a statement. --- ## Add the function .your-turn[ Put the following code into your script: ] ```r animal_sounds <- function(animal, sound) { * assertthat::assert_that( * assertthat::is.string(animal), * assertthat::is.string(sound) * ) paste0("The ", animal, " goes ", sound, "!") } ``` .footnote[.small[ We do not cover writing functions here but you can learn more in the Functions chapter of [R for Data Science](https://r4ds.had.co.nz/) ([Wickham and Grolemund, 2017](#bib-Wickham2017RDS3086927)) ]] ??? If you don't have assertthat installed you can remove these lines. With assertthat: animal_sounds(2, "woof") will give "Error: animal is not a string (a length one character vector)." Without assertthat you will get '[1] "The 2 goes woof!"' --- class: middle ## Test your function ??? In writing any code we will want to test it out. How do we do that when that code is in a package? --- ## Development workflow In a normal script, you might use: ```r source("R/animal_sounds.R") ``` -- but when building packages, we use a `devtools` approach. ??? Add speaker notes --- ## Development workflow <img src="images/dev_cycle_before_testing.png" title="schematic of the development workflow. there are three boxes with arrow joining them clockwise. The boxes are (clockwise from 3' oclock) 'devtools::load_all() Cmd/Ctrl + Shift +L', 'Explore in console' and 'Modify code'" alt="schematic of the development workflow. there are three boxes with arrow joining them clockwise. The boxes are (clockwise from 3' oclock) 'devtools::load_all() Cmd/Ctrl + Shift +L', 'Explore in console' and 'Modify code'" width="600px" style="display: block; margin: auto;" /> -- .center[ You don't even need to save your code! ] ??? devtools::load_all() simulates package installation so that you can test your function. A shortcut is Cmd/Ctrl + Shift + L --- ## `devtools::load_all()` .your-turn[ Load with `devtools::load_all()`. Test the `animal_sounds()` function. ] -- ```r devtools::load_all() ``` ```r Loading mypackage ``` ??? You should see a message telling you: Loading mypackage --- ## test ```r animal_sounds("dog", "woof") ``` ```r [1] "The dog goes woof!" ``` ??? You can now use the animal_sounds() function in the console. Note: differs in other languages! spanish: guau Notice that the function is not in your workspace (as would happen with source()) but is installed and loaded for use as though you have done install.packages() and library() --- ## `devtools::load_all()` .your-turn[ Change some tiny thing about your function - maybe the animal βsaysβ instead of βgoesβ? ] ??? Now you try making a change to the function. You can change some of the words - like this suggests - or have the animal repeat the noise several times: "the dog goes woof, woof, woof!" --- ## `devtools::load_all()` .your-turn[ Load with `devtools::load_all()` and test the updated function. ] --- class: middle ## Check your package! --- ## `devtools::check()` `R CMD check` is the gold standard for checking that an R package is in full working order. -- It is a programme that is executed in the shell. However, `devtools` has the `check()` function to allow you to run this without leaving your R session. π --- ## `devtools::check()` .your-turn[ Check your package ] ```r devtools::check() ``` ??? On running `check()` you may get an error if you are using a networked drive. There's a fix coming in a few slides. --- ## `devtools::check()` You will get lots of output. It will end with: ```r -- R CMD check results -------------------- mypackage 0.0.0.9000 ---- Duration: 12.5s > checking DESCRIPTION meta-information ... WARNING Non-standard license specification: `use_mit_license()`, `use_gpl3_license()` or friends to pick a license Standardizable: FALSE > checking dependencies in R code ... WARNING '::' or ':::' import not declared from: 'assertthat' 0 errors β | 2 warnings x | 0 notes β ``` ??? Errors mean the package won't work until fixed Warnings mean the package will work but is not minimally documented --- ## `devtools::check()` You will get lots of output. It will end with: ```r -- R CMD check results -------------------- mypackage 0.0.0.9000 ---- Duration: 12.5s *> checking DESCRIPTION meta-information ... WARNING * Non-standard license specification: * `use_mit_license()`, `use_gpl3_license()` or friends to pick a * license * Standardizable: FALSE > checking dependencies in R code ... WARNING '::' or ':::' import not declared from: 'assertthat' 0 errors β | 2 warnings x | 0 notes β ``` ??? Warns us we haven't included a license --- ## `devtools::check()` You will get lots of output. It will end with: ```r -- R CMD check results -------------------- mypackage 0.0.0.9000 ---- Duration: 12.5s > checking DESCRIPTION meta-information ... WARNING Non-standard license specification: `use_mit_license()`, `use_gpl3_license()` or friends to pick a license Standardizable: FALSE *> checking dependencies in R code ... WARNING * '::' or ':::' import not declared from: 'assertthat' 0 errors β | 2 warnings x | 0 notes β ``` ??? Warns us we've used a package with explicitly declaring it --- ## Aside: in case of error On running `devtools::check()` you may get an error if you are using a networked drive. ``` Updating mypackage documentation Error: The specified file is not readable: path-to\mypackage\NAMESPACE ``` -- This is covered [here](https://stackoverflow.com/questions/40530968/overwriting-namespace-and-rd-with-roxygen2) and can be fixed. --- ## Aside: a fix for networked drives Save a copy of this file: [fix_for_networked_drives.R](fix_for_networked_drives.R) Save it somewhere other than the `mypackage` directory -- Open the file from the `mypackage` project session -- Run the whole file You should now find that `devtools::check()` proceeds normally --- class: middle # Document your package! ??? For the the purposes of this workshop, we will only cover documentation very briefly. Package documentation is covered in another module and could be the subject of many! --- ## Naming a Package Can only contain the characters [A-Z, a-z, 0-9, .] Tips: - Unique name you can easily Google - Avoid mixing upper and lower case - Use abbreviations - Add an r to make unique, e.g `stringr` - Use wordplay, e.g. `lubridate` - Avoid trademarked names - Use the `available` package to check name not taken ??? First of all, Let's go back to the start. Before creating our package we need a name. Here we used mypackage but later you will want to name your packages more meaningfully --- ## Metadata in `DESCRIPTION` - *Title*: One line, title case, with no period. Fewer than 65 characters. - *Version* - for release: MAJOR.MINOR.PATCH version. - for development version building on version MAJOR.MINOR.PATCH, use: MAJOR.MINOR.PATCH.9000 - *Authors@R*: "aut" means author, "cre" means creator, "ctb" means contributor. ??? Given a version number MAJOR.MINOR.PATCH, increment the: MAJOR version when you make incompatible API changes, MINOR version when you add functionality in a backwards compatible manner, and PATCH version when you make backwards compatible bug fixes. The are two types of documentation: package level and function level. The DESCRIPTION file provides some of the package level documentation (or metadata) --- ## Metadata in `DESCRIPTION` - *Description*: One paragraph describing what the package does. Keep the width of the paragraph to 80 characters; indent subsequent lines with 4 spaces. - *License*: Will discuss later - *Encoding*: How to encode text, use UTF-8 encoding. - *LazyData*: Use `true` to lazy-load data sets in the package. ??? Add speaker notes lazy loading means that data is only loaded if needed. --- ## Update `DESCRIPTION` .tip[ You can use Ctrl/Command + . and start typing a file name to open a file for editing ] .your-turn[ 1. Add a title and description. 2. Add yourself as an author and creator. ] ??? Add speaker notes --- ## Document your package .tip[ There is a lot more to package documentation! There is another module! ] ??? but getting the DESCRIPTION completed is a good start. --- class: middle # License your package --- ## `LICENSE` A license provides legally binding guidelines for the use and distribution of software. Technically, without a license people do not have permission to download and use your package. -- The MIT license is commonly used for open source software. .footnote[.small[ Other licenses are available. See GitHub's [Choose an open source license](https://choosealicense.com/) ]] ??? Add speaker notes --- ## `LICENSE` We can add the MIT license using the helper function `usethis::use_mit_license()` .your-turn[ Add a MIT license. ] ```r usethis::use_mit_license("Emma Rand") ``` --- ```r β Setting active project to 'C:/Users/er13/Desktop/mypackage' β Setting License field in DESCRIPTION to 'MIT + file LICENSE' β Writing 'LICENSE.md' β Adding '^LICENSE\\.md$' to '.Rbuildignore' β Writing 'LICENSE' ``` --- ## `LICENSE` .your-turn[ What has changed? ] ??? Have a look around your files. What files have appeared? Look at the description file --- ## `LICENSE` Using `usethis::use_mit_license()`: - creates a `LICENSE` file - adds a copy of the full license, `LICENSE.Md` - you can open `LICENSE.Md` to see what rights you're granting. - adds these files to `.Rbuildignore` ??? The LICENSE file gives the owner and the date. The full details of the license are given in LICENSE.Md These files are not part of the package functions/machinery are not part of the build. --- ## `devtools::check()` .your-turn[ Check your package ] ```r devtools::check() ``` --- ## `devtools::check()` We've fixed a warning! ```r -- R CMD check results -------------------- mypackage 0.0.0.9000 ---- Duration: 10.8s > checking dependencies in R code ... WARNING '::' or ':::' import not declared from: 'assertthat' 0 errors β | 1 warning x | 0 notes β ``` -- Package dependencies are covered in another module. ??? The error about the missing license has gone. We still have the error about the package dependencies. That willl be covered in another module --- class: middle # Use Git ??? Now will make our package a version controlled project on our local machine and then put it on GitHub. devtools has function to help with this. --- ## Use Git ## Check Git configuration .your-turn[ Ask for a **sit**uation **rep**ort. ] ```r git_sitrep() ``` .footnote[.small[ [Happy Git and GitHub for the useR](https://happygitwithr.com/) is an excellent reference <a name=cite-Bryan_Happy_Git></a>([Bryan and Hester, ](#bib-Bryan_Happy_Git)). ]] ??? This should be done if the previous module was done. To configure if needed usethis::use_git_config(user.name = "Emma Rand", user.email = "emma.rand@york.ac.uk") --- ## Use Git To make our project a Git repository, or 'repo' on our local machine we use `usethis::use_git()` .your-turn[ Make your package a Git repo ] ```r usethis::use_git() ``` --- ```r β Initialising Git repo β Adding '.Rhistory', '.RData' to '.gitignore' There are 8 uncommitted files: β’ '.gitignore' β’ '.Rbuildignore' β’ 'DESCRIPTION' β’ 'LICENSE' β’ 'LICENSE.md' β’ 'mypackage.Rproj' β’ 'NAMESPACE' β’ 'R/' Is it ok to commit them? 1: Yeah 2: Absolutely not 3: No ``` Choose the Yes option --- ```r β Adding files β Commit with message 'Initial commit' β’ A restart of RStudio is required to activate the Git pane Restart now? 1: Nope 2: Definitely 3: No ``` Choose the Yes option ??? You should find the git pane has opened. --- ## Use GitHub To create a copy on GitHub we use `usethis::use_github()` This takes a local project, creates an associated repo on GitHub, adds it to your local repo as the "origin remote", and makes an initial "push" to synchronize. --- ## Use GitHub .your-turn[ Copy your local repo to GitHub ] ```r usethis::use_github() ``` --- ## Use GitHub If you get this: ```r β Checking that current branch is 'main' Which git protocol to use? (enter 0 to exit) 1: ssh <-- presumes that you have set up ssh keys 2: https <-- choose this if you don't have ssh keys (or don't know if you do) ``` Choose 2 at the moment. --- ## Use GitHub ```r i Defaulting to 'https' Git protocol β Creating GitHub repository β Setting remote 'origin' to 'https://github.com/3mmaRand/mypackage.git' β Adding GitHub links to DESCRIPTION β Setting URL field in DESCRIPTION to 'https://github.com/3mmaRand/mypackage' β Setting BugReports field in DESCRIPTION to 'https://github.com/3mmaRand/mypackage/issues' β Pushing 'master' branch to GitHub and setting remote tracking branch β Opening URL 'https://github.com/3mmaRand/mypackage' ``` --- class: middle # π¦ Woohoo, you did it! π¦ --- class: middle # Summary --- ## Summary .small[ - `usethis::create_package()` starts a package with infrastructure as an RStudio Project - functions go in `.R` files in the `\R` directory and `usethis::use_r()` will open a file for editing - `devtools::load_all()` loads your package for testing and we use it often - `devtools::check()` runs the command line tool `R CMD check` from within R and checks your package in in working order - `DESCRIPTION` contains metadata about your package and its presence is the defining feature of a package - `usethis::use_mit_license()` is a helper for adding a MIT license (others are available) - there is a lot more to package documentation and package dependencies! - `usethis::use_git()` and `usethis::use_github()` are helper functions for version control ] --- class: middle # Where next? --- ## Where next? Package Documentation Pack dependencies Unit testing ??? Add speaker notes --- Slides made with: **`knitr`** <a name=cite-knitr1></a><a name=cite-knitr2></a><a name=cite-knitr3></a>([Xie, 2020](#bib-knitr1); [Xie, 2015](#bib-knitr2); [Xie, 2014](#bib-knitr3)),**`R Markdown`** <a name=cite-markdown1></a><a name=cite-markdown2></a>([Allaire Xie, et al., 2019](#bib-markdown1); [Xie Allaire, et al., 2018](#bib-markdown2)), **`xaringan`** <a name=cite-xaringan></a>([Xie, 2019](#bib-xaringan)), **`xaringanthemer`** <a name=cite-xaringanthemer></a>([Aden-Buie, 2020a](#bib-xaringanthemer)), **`xaringanExtra`** <a name=cite-xaringanExtra></a>([Aden-Buie, 2020c](#bib-xaringanExtra)), **`countdown`** <a name=cite-countdown></a>([Aden-Buie, 2020b](#bib-countdown)). Referencing with **`RefManageR`** <a name=cite-McLean-2017></a>([McLean, 2017](#bib-McLean-2017)). Designed by: [Mine Γetinkaya-Rundel](https://twitter.com/minebocek) and [Emma Rand](https://twitter.com/er13_r) --- ## References .tiny[ <a name=bib-countdown></a>[Aden-Buie, G.](#cite-countdown) (2020b). _countdown: A Countdown Timer for R Markdown HTML Presentations and Documents_. R package version 0.3.5. URL: [https://github.com/gadenbuie/countdown](https://github.com/gadenbuie/countdown). <a name=bib-xaringanExtra></a>[Aden-Buie, G.](#cite-xaringanExtra) (2020c). _xaringanExtra: Extras And Extensions for Xaringan Slides_. R package version 0.2.3.9000. URL: [https://github.com/gadenbuie/xaringanExtra](https://github.com/gadenbuie/xaringanExtra). <a name=bib-xaringanthemer></a>[Aden-Buie, G.](#cite-xaringanthemer) (2020a). _xaringanthemer: Custom 'xaringan' CSS Themes_. R package version 0.3.0. URL: [https://CRAN.R-project.org/package=xaringanthemer](https://CRAN.R-project.org/package=xaringanthemer). <a name=bib-markdown1></a>[Allaire, J., Y. Xie, et al.](#cite-markdown1) (2019). _rmarkdown: Dynamic Documents for R_. R package version 1.16. URL: [https://github.com/rstudio/rmarkdown](https://github.com/rstudio/rmarkdown). <a name=bib-Bryan_Happy_Git></a>[Bryan, J. and J. Hester](#cite-Bryan_Happy_Git) _Happy Git and GitHub for the useR_. <URL: https://happygitwithr.com/>. Accessed: 2019-11-22. <a name=bib-McLean-2017></a>[McLean, M. W.](#cite-McLean-2017) (2017). "RefManageR: Import and Manage BibTeX and BibLaTeX References in R". In: _The Journal of Open Source Software_. DOI: [10.21105/joss.00338](https://doi.org/10.21105%2Fjoss.00338). <a name=bib-Wickham2017RDS3086927></a>[Wickham, H. and G. Grolemund](#cite-Wickham2017RDS3086927) (2017). _R for Data Science: Import, Tidy, Transform, Visualize, and Model Data_. 1st. O'Reilly Media, Inc. ISBN: 1491910399, 9781491910399. URL: [https://r4ds.had.co.nz/](https://r4ds.had.co.nz/). <a name=bib-knitr3></a>[Xie, Y.](#cite-knitr3) (2014). "knitr: A Comprehensive Tool for Reproducible Research in R". In: _Implementing Reproducible Computational Research_. Ed. by V. Stodden, F. Leisch and R. D. Peng. ISBN 978-1466561595. Chapman and Hall/CRC. URL: [http://www.crcpress.com/product/isbn/9781466561595](http://www.crcpress.com/product/isbn/9781466561595). <a name=bib-knitr2></a>[Xie, Y.](#cite-knitr2) (2015). _Dynamic Documents with R and knitr_. 2nd. ISBN 978-1498716963. Boca Raton, Florida: Chapman and Hall/CRC. URL: [https://yihui.org/knitr/](https://yihui.org/knitr/). ] --- ## References .tiny[ <a name=bib-xaringan></a>[Xie, Y.](#cite-xaringan) (2019). _xaringan: Presentation Ninja_. R package version 0.12. URL: [https://CRAN.R-project.org/package=xaringan](https://CRAN.R-project.org/package=xaringan). <a name=bib-knitr1></a>[Xie, Y.](#cite-knitr1) (2020). _knitr: A General-Purpose Package for Dynamic Report Generation in R_. R package version 1.30. URL: [https://yihui.org/knitr/](https://yihui.org/knitr/). <a name=bib-markdown2></a>[Xie, Y., J. Allaire, et al.](#cite-markdown2) (2018). _R Markdown: The Definitive Guide_. ISBN 9781138359338. Boca Raton, Florida: Chapman and Hall/CRC. URL: [https://bookdown.org/yihui/rmarkdown](https://bookdown.org/yihui/rmarkdown). ] --- ## License <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">Package Development Module: fill in the module name</span> by <span xmlns:cc="http://creativecommons.org/ns#" property="cc:attributionName">Forwards</span> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.