create your own package
library("usethis")
create_package(path = "../package_name")
use_description()
usethis::is_package()
load library
library(devtools)
load_all() # Cmd/Ctrl + Shift + L
# use_pipe()
use_package("dplyr")
You also need to modify your description file
Imports:
ggplot2
dplyr
# install all dependencies in DESCRIPTION
install_deps()
create function
your_own_function <- function(){
}
Test your package
test() # Cmd/Ctrl + Shift + T
check Malcolm Barrett’s slides for more detail