Skip to content

Commit

Permalink
minor cleanings
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgohel committed Dec 5, 2024
1 parent 133f073 commit 23007aa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 43 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build_book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
env:
CRAN: "https://packagemanager.posit.co/cran/__linux__/jammy/latest"
GITHUB_PAT: ${{ secrets.PAT }}
if: "contains(github.event.head_commit.message, 'deploy: {')"

steps:
- uses: actions/checkout@v3
Expand All @@ -37,10 +36,11 @@ jobs:
pak::pak(c("arrow", "cluster", "dplyr", "flextable", "formatters", "gdtools", "gfonts", "ggforce", "ggplot2", "grid", "magick", "officer", "palmerpenguins", "patchwork", "ragg", "readxl", "rmarkdown", "scales", "stringr", "systemfonts", "tables", "tibble", "tidyverse", "yaml", "remotes", "tinytex", "quarto", "knitr", "htmltools", "here", "renv"))
shell: Rscript {0}

- name: Generate books
# Generate the Quarto book
- name: Render Quarto Project
run: |
quarto::quarto_render(input = ".", as_job = FALSE)
shell: Rscript {0}
quarto render
shell: bash

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
Expand Down
2 changes: 1 addition & 1 deletion 03-flextable-exo.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ library(tidyverse)
## Tableau des cancers en 2021


On va travailler sur un jeu de données présenté sur le site https://data.ameli.fr/pages/data-pathologies/. Le jeu présente quelques statistiques sur le cancer en 2021.
On va travailler sur un jeu de données présenté sur le site <https://data.ameli.fr/pages/data-pathologies/>. Le jeu présente quelques statistiques sur le cancer en 2021.

On vous demande de construire de façon itérative un tableau présentant simplement
les données tout en suivant quelques règles de formatage.
Expand Down
39 changes: 1 addition & 38 deletions _init.qmd
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@



```{r include=FALSE}
# Execute in other qmd files by calling {{< include _init.qmd >}}
library(knitr)
library(flextable)
#Load options
options <- yaml::yaml.load_file('_options.yml', handlers=list(logical=traindown:::verbatim_logical))
for (name in names(options)) {
assign(x = name, value = options[[name]], envir = .GlobalEnv)
}
#For backwards compatibility when calling just show_answer and not options$show_answer
list2env(options, envir = globalenv())
# Additions to temp file paths so they don't cause latex error with "C:"
tempfile <- function(...) {
base::tempfile(...) |> normalizePath(winslash = '/', mustWork = FALSE)
Expand All @@ -28,21 +12,6 @@ tempdir <- function(...) {
}
rmd_file_show <- function(path) {
x <- list(path = path)
class(x) <- "rmd_file_show"
x
}
knit_print.rmd_file_show <- function(x, echo=FALSE, ...) {
str <- c("````markdown",
readLines(con = x$path),
"````"
) |> paste0(collapse = "\n")
asis_output(str)
}
gdtools::register_gfont("Open Sans")
opts_chunk$set(ft.tabcolsep = 2)
Expand Down Expand Up @@ -73,11 +42,5 @@ opts_chunk$set(
)
)
if (options$use_df_printer) {
use_df_printer()
}
use_df_printer()
```

0 comments on commit 23007aa

Please sign in to comment.