Skip to content

Package quick reference

hadley edited this page Jun 11, 2013 · 4 revisions

Quick reference sheet for package process

In progress

All devtools package functions take a package path as the first argument. If it is omitted it assumes the package is in the current working directory - developing the package in this way is best practice.

Create a new package

  • With no R files: create("mypackage")

  • With R files: copy in to a directory called R/ and then run load_all()

Development workflow

  • Re-loading the package during development: load_all() (this loads dependent packages, data, R code and compiled src code)

  • Converting roxygen comments to Rd files: document()

  • Check that in-development documentation looks ok: dev_help("topic")

Deploying

  • Locally
  • On github
  • On CRAN

Building the package for all users of the system

Change to the path of the package

document()
install()

Check the error messages!

Clone this wiki locally