Skip to content
tic example: Building a package with pkgdown documentation
Branch: master
Clone or download
Latest commit 89c7561 May 14, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
R add link Jun 20, 2017
docs Deploy from Travis build 598 [ci skip] Apr 27, 2019
man add link Jun 20, 2017
tests new multiply() Jun 20, 2017
.Rbuildignore Build-ignore Jan 1, 2019
.gitignore infra Jun 17, 2017
DESCRIPTION Deploy from Travis build 434 [ci skip] Nov 7, 2018
NAMESPACE new multiply() Jun 20, 2017 delete duplicate text May 12, 2019
appveyor.yml Align May 14, 2019
codecov.yml badges and integration Jun 17, 2017
tic.R pkgdown only on Travis May 14, 2019
tic.package.Rproj infra Jun 17, 2017


Travis-CI Build Status Build status Coverage Status

A minimal example package with pkgdown documentation created and uploaded by tic (the pkgdown documentation is written to, and served from, the docs directory of the master branch.). tic is an R package for CI-agnostic workflow definitions for various R projects. See its documentation for more information.

Set up an operational fork of this repository

If you want to experiment with travis and tic for a R package, you can fork it.

  1. Use usethis::create_from_github() to automatically create a fork of this repo. If you use RStudio, a new RStudio project will open. You may need to set up your SSH credentials first. See this guide if you're having problems. (It's definitely worth getting this function running as it saves you a lot of time in the future!) Alternatively, fork this repo on Github and then create a new R Project within RStudio (File -> New Project -> Version Control -> Github).
  2. Run tic::use_tic() to set up all requirements needed for the CI integration of your package.

Create a package from scratch

This is the detailed way going step by step from the bottom up. Looking here can be useful if you already have an R package and just want to add some functionality to it, e.g. using roxygen2 with Markdown (item 3) or enabling CI for your package (item 6).

  1. Use usethis::create_package("<path-to-package-dir>"). Here is an example with a package called tic.package stored within the ~/git/ directory:

    ✔ Changing active project to '/home/<username>/git/tic.package'Creating 'R/'Creating 'man/'Writing 'DESCRIPTION'Writing 'NAMESPACE'Writing 'tic.package.Rproj'Adding '.Rproj.user' to '.gitignore'Adding '^tic.package\\.Rproj$', '^\\.Rproj\\.user$' to '.Rbuildignore'Opening new project 'tic.package' in RStudio
  2. Initialize Git via usethis::use_git():

    ✔ Changing active project to '/home/<username>/git/tic.package'
    ✔ Initialising Git repo
    ✔ Adding '.Rhistory', '.RData' to '.gitignore'
    OK to make an initial commit of 5 files?
    1: Yup
    2: No
    3: Absolutely not
    Selection: 1
    ✔ Adding files and committing
    ● A restart of RStudio is required to activate the Git pane
    ● Restart now?
    1: Absolutely
    2: No way
    3: Absolutely not
    Selection: 1
  3. (Optional) Use roxygen2 with Markdown support for package documentation: usethis::use_roxygen_md():

    Changing active project to '/home/<username>/git/tic.package'Setting Roxygen field in DESCRIPTION to 'list(markdown = TRUE)'Setting RoxygenNote field in DESCRIPTION to ''Run `devtools::document()`
  4. Add a license: usethis::add_gpl3_license() (or any license of your choice):

    Changing active project to '/home/<username>/git/tic.package'Setting License field in DESCRIPTION to 'GPL-3'Writing ''Adding '^LICENSE\\.md$' to '.Rbuildignore'
  5. Create a Github repo by using usethis::use_github():

    Check title and description
      Name:        tic.package
      Description: What the Package Does (One Line, Title Case)
    Are title and description ok?
    1: No way
    2: I agree
    3: Nope
    Selection: 2Creating GitHub repositoryAdding GitHub remoteAdding GitHub links to DESCRIPTIONSetting URL field in DESCRIPTION to '<user>/tic.package'Setting BugReports field in DESCRIPTION to '<user>/tic.package/issues'Pushing to GitHub and setting remote tracking branch
  6. Set up Continuous Integration by using tic::use_tic(). Take a look at the Getting Started vignette of the tic package for a detailed walkthrough.

You can’t perform that action at this time.