introduction to roxygen2
play

Introduction to roxygen2 Aime Gott Education Practice Lead, Mango - PowerPoint PPT Presentation

DataCamp Developing R Packages DEVELOPING R PACKAGES Introduction to roxygen2 Aime Gott Education Practice Lead, Mango Solutions DataCamp Developing R Packages Help files DataCamp Developing R Packages roxygen headers DataCamp


  1. DataCamp Developing R Packages DEVELOPING R PACKAGES Introduction to roxygen2 Aimée Gott Education Practice Lead, Mango Solutions

  2. DataCamp Developing R Packages Help files

  3. DataCamp Developing R Packages roxygen headers

  4. DataCamp Developing R Packages Title

  5. DataCamp Developing R Packages Description

  6. DataCamp Developing R Packages Details

  7. DataCamp Developing R Packages Arguments

  8. DataCamp Developing R Packages Imports

  9. DataCamp Developing R Packages DEVELOPING R PACKAGES Let's practice!

  10. DataCamp Developing R Packages DEVELOPING R PACKAGES What Does Exporting a Function Mean and Why Do It? Nic Crane Data Science Consultant, Mango Solutions

  11. DataCamp Developing R Packages Exported Functions Exported functions: visible to the end user key package functionality Non-exported functions: not visible to end user utility functions

  12. DataCamp Developing R Packages Exported and Non Exported Functions #' Count NAs in a vector #' #' @param x A vector #' #' @return Number of NAs in x #' #' @examples #' sumNa(airquality$Ozone) sum_na <- function(x) { sum(is.na(x)) }

  13. DataCamp Developing R Packages Exported and Non Exported Functions

  14. DataCamp Developing R Packages Exported and Non-Exported Functions library(simutils) na_counter(airquality) Ozone Solar.R Wind Temp Month Day 37 7 0 0 0 0

  15. DataCamp Developing R Packages Calling Non-Exported Functions library(simutils) sum_na(airquality$Ozone) Error: could not find function "sum_na"

  16. DataCamp Developing R Packages Calling Non-Exported Functions simutils:::sum_na(airquality$Ozone)

  17. DataCamp Developing R Packages Exporting Functions with roxygen Headers

  18. DataCamp Developing R Packages DEVELOPING R PACKAGES Let's practice!

  19. DataCamp Developing R Packages DEVELOPING R PACKAGES What Other Elements Can We Document with roxygen Headers? Aimée Gott Education Practice Lead, Mango Solutions

  20. DataCamp Developing R Packages Documenting Examples

  21. DataCamp Developing R Packages Non-Running Examples

  22. DataCamp Developing R Packages Documenting Function Return Values

  23. DataCamp Developing R Packages Additional Documentation

  24. DataCamp Developing R Packages DEVELOPING R PACKAGES Let's practice!

  25. DataCamp Developing R Packages DEVELOPING R PACKAGES Documenting a Package Nic Crane Data Science Consultant, Mango Solutions

  26. DataCamp Developing R Packages Package Level Documentation

  27. DataCamp Developing R Packages Minimum Level of Documentation For each function, document: Title Description Arguments Exported (for exported functions only)

  28. DataCamp Developing R Packages Documenting Data Objects use_data(sim_dat, pkg = "simutils")

  29. DataCamp Developing R Packages Documenting Data Objects

  30. DataCamp Developing R Packages Creating man Files document("simutils")

  31. DataCamp Developing R Packages DEVELOPING R PACKAGES Let's practice!

Recommend


More recommend