Create repository

I create a shroom git repo then cloned into it by hand by creating an RStudio Project

Set up package

I then used create_package() within my project directory to build the basic package infrastructe. This overights the initial project

Create vignette infrastructure

Create a dummy vignette

use_vignette("Introduction")

Create readme and news

use_git_ignore(".pdf", directory = ".")

Add required packages

use_package("dplyr", "Imports")
use_package("tidyr", "Imports")
use_package("plotrix", "Imports")

use_package("data.tree", "Imports")
use_package("treemap", "Imports")
use_package("igraph", "Imports")

use_package("dplyr", "Imports")
use_package("tidyr", "Imports")
use_package("ggplot2", "Imports")
use_package("nlme", "Imports")
use_package("lme4", "Imports")
use_package("bbmle", "Imports")
use_package("RCurl", "Imports")
use_package("GGally", "Imports")
use_package("broom", "Imports")

Setting up data

file. <- here::here("./inst/extdata",
                    "data_ind_fly_wing_scores_2018.csv")

wingscores <- read.csv(file.)
use_data(wingscores)

Don’t save/load user workspace between sessions

Use roxygen

Package-level documents

use_r() #Create or edit a .R file

use_build_ignore() Add files to .Rbuildignore

use_package_doc() Package-level documentation

use_pkgdown() Use pkgdown

Use roxygen with markdown

use_version() use_dev_version() Increment package version

edit_r_profile() edit_r_environ() edit_r_makevars() edit_rstudio_snippets() edit_git_config() edit_git_ignore()

use_directory()

Use a directory