researchR_build_script.R

# Creating a Personal R Package

# A package to make package development easier
library(devtools)

# Creates the barebones of my package, including:
  # A directory that houses my packages files
  # Some files that I will edit later ("DESCRIPTION", "NAMEPACE", etc.)
  # A directory called R, that will house my functions!

devtools::create("C:/Users/millionc/OneDrive - YCCD/R/researchR")


# Make sure this script does not get built with the package
# i.e., put it into .Rbuildignore
devtools::use_build_ignore("researchR_build_script.R")
devtools::use_build_ignore("README.md")

# Include package dependencies. Which packages does my package depend on?
devtools::use_package("dplyr")

# Document my functions bu putting #' and @params
devtools::document()

# In your functions documentation, make sure you include the following command somewhere in the #` block

    #`
    #`@export
    #`

# Including Data

#Load a dataset into the working library then use
devtools::use_data()

#Document a Dataset by creating a .R file with the same name as the dataset.


# Where you are ready to install your package, use the following function
devtools::install()
christian-million/researchR documentation built on May 15, 2019, 12:45 p.m.