Skip to content

Latest commit

 

History

History
110 lines (75 loc) · 1.4 KB

README.md

File metadata and controls

110 lines (75 loc) · 1.4 KB

becausejustynfun

What the Package Does (One Line, Title Case)

This is for functions that I use regularly such as plotting stuff

It is also the first package that I have made so it is expected to have bugs.

Guide used: https://www.pipinghotdata.com/posts/2020-10-25-your-first-r-package-in-1-hour/

Package Development Libraries

library(usethis)
library(devtools)

Create new package.

usethis::create_package("path/package")

Connect to GitHub repo.

usethis::use_git()
usethis::use_github()

Add license.

usethis::use_mit_license("Your name")

Check build.

devtools::check()

Create new function.

usethis::use_r("function_name")

Test drive function.

devtools::load_all()

Insert Roxygen skeleton.

Put curser inside the function then either
	Code -> Insert Roxygen Skeleton
	Shift + Option + Apple + R

Document package.

devtools::document()

Preview documentation.

?function

Check build.

devtools::check()

Specify package dependencies.

usethis::use_package("package")

Specify functions within packages.

package::function

Document package.

devtools::document()

Check build.

devtools::check()

Install package.

devtools::install("path/package") 
#or
devtools::install_github("user/repo")