ImperialCollegeLondon / repositoryr

An example R package repository structure
https://imperialcollegelondon.github.io/repositoryr/
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link
hacktoberfest hacktoberfest2024

repositoryr

The goal of repositoryr is to provide a step by step guide to creating a R package repository.

Requirements

Selecting a package name

Install the package available in RStudio using install.packages("available"). To find suggestions on valid package names use available::suggest(text="description of what the package does"). You can also check whether the package name is available using available::available("pkgname").

Using available package

Alternatively, you can use pak::pkg_name_check("healthgpsrvis", dictionaries = NULL). (Note: To install pak, use install.packages("pak")).

Using pak package

Creating a package

Create and connect with a GitHub repository

More details: Create and connect a GitHub repo

Connect local repo to GitHub repo

Connect local repo to GitHub repo with the command line

git remote add origin https://github.com/ImperialCollegeLondon/repositoryr
git push --set-upstream origin main

Using devtools

Using devtools::check()

Update DESCRIPTION file

Add R files and corresponding unit tests

Setup documentation

Build a README

Create website for your package

Installation

You can install the development version of repositoryr from GitHub with:

# install.packages("pak")
pak::pak("ImperialCollegeLondon/repositoryr")