Chapter 8 Package building/maintaining tips

8.1 Package building/maintaining tips

This section has helpful reminders for building and maintaining R packages.

Update package documentation

# devtools::document()

Add package

# use_package()

Add function from package. Adding a function from a package instead of the whole package keeps things lighter weight. If you want to just add a function, use the script below and put it in your function.R file where you use their function.

# @importFrom package-name object1 object2 objectn

Make a package documentation file

# usethis::use_package_doc()

Check out this link for more details - https://devtools.r-lib.org/