-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.R
41 lines (32 loc) · 1 KB
/
setup.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
hexes <- function(..., size = 64) {
x <- c(...)
x <- sort(unique(x), decreasing = TRUE)
right <- (seq_along(x) - 1) * size
res <- glue::glue(
'![](hexes/<x>.png){.absolute top=-20 right=<right> width="<size>" height="<size * 1.16>"}',
.open = "<", .close = ">"
)
paste0(res, collapse = " ")
}
hexes_svg <- function(..., size = 64) {
x <- c(...)
x <- sort(unique(x), decreasing = TRUE)
right <- (seq_along(x) - 1) * size
res <- glue::glue(
'![](hexes/<x>.svg){.absolute top=-20 right=<right> width="<size>" height="<size * 1.16>"}',
.open = "<", .close = ">"
)
paste0(res, collapse = " ")
}
hexes_duckdb <- function(..., size = 64) {
x <- c(...)
x <- sort(unique(x), decreasing = TRUE)
right <- (seq_along(x) - 1) * size
res <- glue::glue(
'![](hexes/<x>.png){.absolute top=-20 right=<right> height="<size * 1.16>"}',
.open = "<", .close = ">"
)
paste0(res, collapse = " ")
}
# devtools::install_github("gadenbuie/countdown")
library(countdown)