-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
2,597 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
title: "2022: Day 2" | ||
date: 2022-12-2 | ||
categories: | ||
- TAG_1 | ||
- TAG_2 | ||
draft: false | ||
--- | ||
|
||
## Setup | ||
|
||
[The original challenge](https://adventofcode.com/2022/day/2) | ||
|
||
[My data](input){target="_blank"} | ||
|
||
## Part 1 | ||
|
||
```{r} | ||
#| echo: false | ||
OK <- "2022" < 3000 | ||
# Will only evaluate next code block if an actual year has been substituted for the placeholder | ||
``` | ||
|
||
|
||
```{r} | ||
#| eval: !expr OK | ||
library(aochelpers) | ||
# other options: aoc_input_data_frame(), aoc_input_matrix() | ||
input <- aoc_input_vector(2, 2022) | ||
head(input) | ||
``` | ||
|
||
## Part 2 | ||
|
||
|
||
##### Session info {.appendix} | ||
|
||
<details><summary>Toggle</summary> | ||
|
||
```{r} | ||
#| echo: false | ||
library(sessioninfo) | ||
# save the session info as an object | ||
pkg_session <- session_info(pkgs = "attached") | ||
# get the quarto version | ||
quarto_version <- system("quarto --version", intern = TRUE) | ||
# inject the quarto info | ||
pkg_session$platform$quarto <- paste( | ||
system("quarto --version", intern = TRUE), | ||
"@", | ||
quarto::quarto_path() | ||
) | ||
# print it out | ||
pkg_session | ||
``` | ||
|
||
</details> | ||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.