Back to Course
Package Development with R
0% Complete
0/0 Steps
-
Welcome, Logistics, Course Materials, and Additional Resources
-
Setup packagesdevtools and usethis
-
Package names and authors
-
Choose a license
-
Setup git + GitHub
-
Write codeWriting functions
-
Adding functions to our package
-
Using other packages
-
Packages so good they get their own functions
-
Organizing .R files
-
Documentroxygen2: In-Line Documentation for R
-
Argument descriptions and examples
-
Helper functions
-
Joining documentation
-
TestUnit tests for R
-
Organizing tests
-
R CMD Check
-
Types of Test Files
-
Test Coverage
-
TeachExamples
-
README
-
Spellcheck
-
Add data and filesStore data and files
-
Include data for tests and create RMarkdown templates
-
Create other templates
-
Launch and store Shiny apps
-
Citations, ignoring files, and including add-ins
Lesson 24 of 27
In Progress
Include data for tests and create RMarkdown templates
Your Turn 2
- Create a new R Markdown template called “avalanche-report” using use_rmarkdown_template(). For the template_description argument, set it to: “A weekly report of AVALANCHE activities.”
- Inside the exercises/ folder, there is a file called report.Rmd. Copy and paste its contents into inst/rmarkdown/templates/avalanche- report/skeleton/skeleton.Rmd, which you just created.
- Re-build the package (build() or Cmd/Ctrl + Shift + B).
- Create a new R Markdown document using File > New File > R Markdown…. Then, find your template under the “From Template” tab. Open it.
Solutions
Learn More
The RMarkdown Cookbook has a section on creating RMarkdown templates in packages.
Have any questions? Put them below and we will help you out!