Skip to content

Commit

Permalink
Add 2022 day 2 (to test GHA)
Browse files Browse the repository at this point in the history
  • Loading branch information
EllaKaye committed Nov 24, 2023
1 parent a7871f1 commit 305736b
Show file tree
Hide file tree
Showing 4 changed files with 2,597 additions and 0 deletions.
65 changes: 65 additions & 0 deletions 2022/day/2/index.qmd
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>





Loading

0 comments on commit 305736b

Please sign in to comment.