Developing R Packages
Offered By: DataCamp
Course Description
Overview
Learn to develop R packages and boost your coding skills. Discover package creation benefits, practice with dev tools, and create a unit conversion package.
Acquire the skills to develop your own R package from scratch by understanding how to structure your code, document your functions, and test your package. You'll learn how to use various packages including devtools, roxygen2, testthat and more as well as rmarkdown to speed up and improve your package development workflow. Get ready to dive into the dynamic world of R package development and empower yourself with a valuable toolset that can greatly enhance your data analysis journey!
Acquire the skills to develop your own R package from scratch by understanding how to structure your code, document your functions, and test your package. You'll learn how to use various packages including devtools, roxygen2, testthat and more as well as rmarkdown to speed up and improve your package development workflow. Get ready to dive into the dynamic world of R package development and empower yourself with a valuable toolset that can greatly enhance your data analysis journey!
Syllabus
- Creating R Packages: From Data to Functions
- Dive into the essentials of R package construction, from understanding the architecture, the critical R and man directories, to the significance of the DESCRIPTION and NAMESPACE files. Get hands-on with the usethis package as you create your own package skeleton and include data. Strengthen your R function writing skills, grasp best practices for package development, and get comfortable saving functions to a file. Finally, install your package locally using devtools.
- Designing R Packages: Package Naming and Dependencies
- Learn the advantages of creating packages versus using scripts, exploring the impact on code organization, reproducibility, collaboration, and sharing. Discover effective strategies for structuring code and functions within the R directory, and choosing an appropriate name and license for your package. Finally, you’ll learn how to manage CRAN package dependencies.
- Package Documentation: Generating Help Files and Vignettes
- Harness the power of examples in documentation by creating function examples with roxygen2. Understand the significance of examples in clarifying function behavior and identifying key components of a well-documented R function. Explore the purpose of vignettes in R package documentation and learn best practices for creating engaging vignettes and evaluating their content and quality through metadata analysis.
- Testing R Packages: Using Unit Tests and Robust Checks
- Identify why the unit tests are important to package development and maintenance and learn how to implement the testthat package for unit tests. Convert R examples into expectations to build your unit test knowledge. You’ll then gain an understanding on how to document your package data and run some final checks to ensure you have developed a robust R package.
Taught by
Jasmin Ludolf
Related Courses
Ruby on Rails: An IntroductionJohns Hopkins University via Coursera Internet of Things Capstone: Build a Mobile Surveillance System
University of California, San Diego via Coursera Engineering Maintainable Android Apps
Vanderbilt University via Coursera Orientação a Objetos com Java
Instituto Tecnológico de Aeronáutica via Coursera TDD – Desenvolvimento de Software Guiado por Testes
Instituto Tecnológico de Aeronáutica via Coursera