input: Get Advent of Code input

Description Usage Arguments Value Examples

View source: R/input.R

Description

By default the input() downloads current date Advent of Code puzzle input. Also can be used for previous puzzles.

Usage

1
2
3
4
5
6
7
input(
  year = curr_year(),
  day = curr_day(),
  path = paste0("input", day, ".txt"),
  verbose = TRUE,
  open_file = FALSE
)

Arguments

year

Contest year. The default value is current day.

day

Day of the puzzle. The default value is current day.

path

File path to save input data. The default vale is "input{day}.txt".

verbose

Logical flag for printing HTTP response. The default value is TRUE.

open_file

Logical flag for open to saved file. The default value is FALSE.

Value

The file path where input saved.

Examples

1
2
3
4
5
6
## Not run: 
input()
input(2021, 1)
purrr::walk(1:25, ~input(2020, .x))

## End(Not run)

botan/aocr documentation built on Jan. 5, 2022, 4:10 p.m.