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
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.
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).
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).
usethis::create_package("<path-to-package-dir>"). Here is an example with a package called
tic.packagestored within the
usethis::create_package("~/git/tic.package") ✔ 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
Initialize Git via
✔ 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
(Optional) Use roxygen2 with Markdown support for package documentation:
✔ Changing active project to '/home/<username>/git/tic.package' ✔ Setting Roxygen field in DESCRIPTION to 'list(markdown = TRUE)' ✔ Setting RoxygenNote field in DESCRIPTION to '22.214.171.12400' ● Run `devtools::document()`
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 'LICENSE.md' ✔ Adding '^LICENSE\\.md$' to '.Rbuildignore'
Create a Github repo by using
● 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: 2 ✔ Creating GitHub repository ✔ Adding GitHub remote ✔ Adding GitHub links to DESCRIPTION ✔ Setting URL field in DESCRIPTION to 'https://github.com/<user>/tic.package' ✔ Setting BugReports field in DESCRIPTION to 'https://github.com/<user>/tic.package/issues' ✔ Pushing to GitHub and setting remote tracking branch