setup_package: Set up a new package

View source: R/setup.R

setup_packageR Documentation

Set up a new package

Description

A simple wrapper function for a suite of standard package set up steps. Intended use is:

  1. Create and clone a new repo. The name of the repo will be the name of the package, so you might like to run available::available("potential_name") to check if the package name already exists (you don't want conflicts) or if it's a swear.

  2. Open a new R project in the cloned folder. A normal project is fine, you don't need to select the Package option.

  3. Run sak::setup_package() which will which will set up boilerplate folders and change the RStudio project file, and then adds things like package documentation, an MIT license, tidy styling, a news file, spell check, and support for tidy eval, pipes and tibbles.

  4. Fill in the standard details in the description and readme files, then develop as normal.

Usage

setup_package(type = "full")

Arguments

type

What kind of configuration to create?

  • tidyverse creates a minimal lintr config, based on the default linters (linters_with_defaults()). These are suitable for following the tidyverse style guide.

  • full creates a lintr config using all available linters via all_linters().

Value

Nothing returned, this is run for side effects (which include creating multiple files and folders).

Examples

## Not run: 
sak::setup_package()

## End(Not run)

baslat/sak documentation built on April 14, 2025, 4:14 p.m.