January 13, 2019

Document Generation

  • If everything is in check build the documentation.
  • This generates the Rd files for functions and data-sets.
  • Build —> Document

Clean and Rebuild

  • After building the documentation now build the package again or for the first time.
  • This is to update the changes you have done in the code or in data-sets.
  • Build —> Clean and Rebuild

Specll Check Rd files

  • In the R console use the below code and check for spelling errors in Rd files.
  • devtools::spell_check()

Test the Package

  • Run all the written tests on functions and data-sets.
  • Build —> Test Package

Check for Errors

  • Check for errors in package.
  • Build —> Check Package
  • Possibly if data-sets in proper form of extension.
  • Unfinished code or Improper documentation.
  • Missed packages or functions on Import.

Build Source Package

  • If every thing in order then build package with tar.gz extension.
  • Extension is for mac or Linux distributions.
  • Build —> Build Source Package

Build Binary Package

  • Similarly build package with zip extension.
  • This extension is for windows operating systems.
  • Build —> Build Binary Package

Configure Build Tools is for changing options related to package developement.

Generate Manual pdf

  • Next to R console is the Terminal window.
  • Type the below code to achieve a manual in pdf form compiled using the generated Rd files.
  • This pdf document will be outside your project folder.

cd .. (to leave the project folder)

R CMD Rd2pdf (to generate the pdf file)

Check Errors on Source Package

  • Check for errors in the built source package.
  • A log file will be outside the project folder after this process.
  • This file will have information of the error checking process.

cd .. (to leave the project folder)

R CMD check <package.name>.tar.gz (check for errors and publish a log file)

THANK YOU