Get access to all lessons in this course.
Package Development with R
- devtools and usethis
- Package names and authors
- Choose a license
- Setup git + GitHub
- Writing functions
- Adding functions to our package
- Using other packages
- Packages so good they get their own functions
- Organizing .R files
- roxygen2: In-Line Documentation for R
- Argument descriptions and examples
- Helper functions
- Joining documentation
- Unit tests for R
- Organizing tests
- R CMD Check
- Types of Test Files
- Test Coverage
Add data and files
- Store 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
devtools and usethis
This lesson is locked
This lesson is called devtools and usethis, part of the Package Development with R course. This lesson is called devtools and usethis, part of the Package Development with R course.
Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.
Welcome to section 1 of the course! The materials for this section are in this GitHub repo.
Load usethis and devtools if you haven’t.
Open the DESCRIPTION file and take a look. It’s very generic!
Run edit_r_profile(). Copy and paste this code into your R profile, but change it to your name and email. If you would like to add your ORCID ID see ?use_description for an example for an example that includes that.
Then, restart your R session Session > Restart R.
If you don’t want to change your R profile, you can just run the code in the console without running edit_r_profile() or restarting
When you’ve restarted, run use_description() to replace the DESCRIPTION file.
Open the DESCRIPTION file and take a look around.
Your Turn 1 Stretch Goal
Read the help page for use_usethis(). If there are any of these that you’d like available in all interactive sessions, run the function to get the related code and add it to your R Profile.