Description Usage Arguments Details Value
Puzzle inputs are typically saved in the form of text files with the name
input01.txt
, input02.txt
, ... etc. in the package's inst/
folder.
This helper function makes it easy to read in the data using the readLines
,
scan
or read.csv
functions, as appropriate.
1 | input_file(day)
|
day |
integer between 1 and 25 |
Sometimes inputs are simple strings or numbers and passed directly to
the function, rather than being read from file. So not every day will have an
input.txt
file associated with it.
File path, e.g. "path/to/input01.txt"
.
If that file does not exist, or if the argument day
is not between 1 and
25, an error will be thrown.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.