aoc_init: Copy Template for Day

View source: R/aoc_init.R

aoc_initR Documentation

Copy Template for Day

Description

This function copies the bundled RMarkdown template into a folder within the (current) path, creating a subfolder for the year if necessary and pre-filling variables

Usage

aoc_init(
  day,
  year = format(Sys.Date(), "%Y"),
  path = here::here(),
  overwrite = FALSE,
  template = Sys.getenv("AOC_TEMPLATE", unset = "default"),
  open = Sys.getenv("AOC_OPEN", unset = "true")
)

Arguments

day

the day of the puzzle

year

year of puzzle, defaults to current year

path

path to copy template to, defaults to subfolders of current directory

overwrite

overwrite existing file, default to FALSE

open

open file for editing, if RStudio is available

Value

opens the template


tanho63/aoc.elf documentation built on Jan. 30, 2024, 1:50 p.m.