Closed zajichek closed 1 year ago
Following recommendations here: https://happygitwithr.com/new-github-first.html
library(devtools)
# 1. Initialize the R project and locally connect to the remote repo
usethis::create_from_github(
repo_spec = "https://github.com/ClevelandClinicQHS/riskcalc.git",
destdir = "<path to local repo>"
)
# 2. Create package structure, overwriting existing files
usethis::create_package(path = "<path to local repo>/riskcalc")
Also added a couple (additional) things to .gitignore
and .Rbuildignore
right away:
^\.Rhistory$
^\.DS_Store$
Added toy function use_r("riskcalc_fun")
and added Roxygen template to generate documentation with document()
Added an MIT license via use_mit_license()
Added testing structure with use_testthat()
Setup README
use_readme_rmd()
build_readme()
Setting up package structure and workflow, following best practice: https://r-pkgs.org/whole-game.html