Skeletor is a tool for bootstrapping new packages with useful defaults and scaffolding. Package skeletons it creates contain a test suite outline and hooks for adding documentation. They also are created with a Makefile to facilitate running tests, checking test coverage, building vignettes, and more. Skeletor also sets up packages to use git/GitHub for version control and Travis-CI to build and test your packages whenever you push to GitHub. Integrations with Codecov.io and Appveyor are also made effortless, and with one additional argument, you can get additional boilerplate and testing setup for writing an R package that wraps an API.

While other R package skeletons exist, I found that I never used them. The defaults of the base R’s package.skeleton(), copying functions from the current R session, never are what I want, and what devtools::create() makes is too bare. I found that I was starting every package by copying the last package I made, deleting its code and tests, and renaming everything. skeletor automates that.

## Installing

skeletor is available on CRAN:

install.packages("skeletor")

The pre-CRAN-release version of the package can be pulled from GitHub using the devtools package:

# install.packages("devtools")
devtools::install_github("nealrichardson/skeletor")

## Using

Skeletor provides two functions: (1) skeletor(), which makes package skeletons, and (2) configure(), which sets a few parameters in your .Rprofile so that you don’t need to provide them each time. These parameters, which are inserted into the package skeleton template, are:

After installing, run configure() once to set these, like:

> library(skeletor)
> configure(name="Neal Richardson", email="neal.p.richardson@gmail.com",
github="nealrichardson")

Thereafter, simply running