Skip to content

Instantly share code, notes, and snippets.

@jirilukavsky
Created February 16, 2024 08:36
Show Gist options
  • Save jirilukavsky/df165abd73c83688112d331885465d98 to your computer and use it in GitHub Desktop.
Save jirilukavsky/df165abd73c83688112d331885465d98 to your computer and use it in GitHub Desktop.
New R package
# adapted from https://usethis.r-lib.org/
library(usethis)
# Create a new package -------------------------------------------------
path <- file.path(getwd(), "jatosR")
create_package(path)
# only needed since this session isn't interactive
proj_activate(path)
use_mit_license("Jiri Lukavsky")
use_package("dplyr", type = "Imports")
use_package("purrr", type = "Imports")
# use_package("ggplot2", "Suggests")
use_readme_md()
use_news_md()
use_git()
# use_github(organisation = "visionlabels", private = T)
use_github(organisation = NULL, private = T)
# use_test("my-test") # for "test-my-test.R
# x <- 1
# y <- 2
# use_data(x, y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment