.Library
, .libPaths()
install.packages("devtools")
. Setup chapter of the R packages book.
install.packages("pak")
.
usethis::git_sitrep()
. Managing Git(Hub) Credentials; “Managing GitHub credentials from R, difficulty level linux”.
usethis and devtools setup in my .Rprofile. usethis::edit_r_profile()
, what is an .Rprofile? usethis setup article.
Setup is not fun!
π§° (no breakout room) Anything still amiss to report? π€
pak::pkg_name_check("minipkg")
usethis::create_package("../minipkg")
usethis::use_github()
. Look at repository including β¨ issue tracker β¨.
π usethis website
π§° Repeat the same steps, post the link to your package repo in the chat!
usethis::use_r("time")
. Explain what sprintf()
does.
devtools::load()
, what_time()
.
add an argument.
devtools::load()
, what_time()
, what_time(language = "en")
.
add two dependencies, use_package("praise")
and use_package("rlang")
.
devtools::load()
, what_time()
, what_time(language = "en")
.
Insert roxygen2 skeleton.
devtools::document()
, ?what_time
, show the Rd file.
use_testthat()
.
use_test("time")
: first a simple test, then a snapshot test, then a snapshot of the error.
devtools::test()
/ test the file on its own via the button.
Build and reload (install packages from RStudio build tab), try using the package from another session. Or install from GitHub.
π roxygen2 website
π testthat website
π R Packages book, the whole game
π§° repeat the steps!
β οΈ rmarkdown and pkgdown needs your package to be installed.
install.packages("rmarkdown")
, usethis::use_readme_rmd()
, write stuff, knit, commit+push, look at GitHub repository.
usethis::use_vignette("minipkg")
, write stuff.
install.packages("pkgdown")
, usethis::use_pkgdown()
, pkgdown::build_site()
. Locally.
π pkgdown website
usethis::use_github_action_check_standard()
. Check on the cloud, different operating systems.
usethis::use_github_action("pkgdown")
, change GitHub pages settings of the repo, add URL to pkgdown config and to DESCRIPTION.
π usethis support for GitHub Actions setup
π§° Repeat the steps!