Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ojothemes
Title: OJO, OKPI, and TOK themes for ggplot2 and gt
Version: 1.1.0
Version: 1.1.1
Authors@R:
c(
person(
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# ojothemes 1.1.1 (2025-04-20)

* Actually does that...

# ojothemes 1.1.0 (2025-04-20)

* Brings clean "Title Case" to column headers created by gt_* functions using `{snakecase}`
3 changes: 2 additions & 1 deletion R/ojo_gt.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ gt_base <- function(data,
analyst_name = NA, source = NA
){
x <- data |>
dplyr::rename_with(snakecase::to_title_case) |>
gt::gt() |>
gt::tab_options(
heading.align = "left",
Expand All @@ -37,7 +38,7 @@ gt_base <- function(data,
column_labels.font.size = gt::px(font_size)
) |>
gt::tab_spanner(
label = snakecase::to_title_case(colnames(data))
label = stringr::str_to_title(colnames(data))
) |>
gt::tab_options(
column_labels.font.size = "medium",
Expand Down
28 changes: 20 additions & 8 deletions renv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,13 @@
},
"curl": {
"Package": "curl",
"Version": "5.2.3",
"Version": "6.2.2",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R"
],
"Hash": "d91263322a58af798f6cf3b13fd56dde"
"Hash": "e4f9e10b18f453a1b7eaf38247dad4fe"
},
"digest": {
"Package": "digest",
Expand Down Expand Up @@ -458,7 +458,7 @@
},
"knitr": {
"Package": "knitr",
"Version": "1.49",
"Version": "1.50",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
Expand All @@ -470,7 +470,7 @@
"xfun",
"yaml"
],
"Hash": "9fcb189926d93c636dea94fbe4f44480"
"Hash": "5a07d8ec459d7b80bd4acca5f4a6e062"
},
"labeling": {
"Package": "labeling",
Expand Down Expand Up @@ -671,14 +671,14 @@
},
"rlang": {
"Package": "rlang",
"Version": "1.1.4",
"Version": "1.1.6",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"utils"
],
"Hash": "3eec01f8b1dee337674b2e34ab1f9bc1"
"Hash": "892124978869b74935dc3934c42bfe5a"
},
"rmarkdown": {
"Package": "rmarkdown",
Expand Down Expand Up @@ -760,6 +760,18 @@
],
"Hash": "c12e756cf947e58b0f2c2a520521a5a8"
},
"snakecase": {
"Package": "snakecase",
"Version": "0.11.1",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"stringi",
"stringr"
],
"Hash": "58767e44739b76965332e8a4fe3f91f1"
},
"stringi": {
"Package": "stringi",
"Version": "1.8.4",
Expand Down Expand Up @@ -890,7 +902,7 @@
},
"xfun": {
"Package": "xfun",
"Version": "0.49",
"Version": "0.52",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
Expand All @@ -899,7 +911,7 @@
"stats",
"tools"
],
"Hash": "8687398773806cfff9401a2feca96298"
"Hash": "652ce36fe7d57688e6786819b09d9190"
},
"xml2": {
"Package": "xml2",
Expand Down