knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

gouvdown

R build status Codecov test coverage

gouvdown let you write R Markdown documents which comply with the French government design system.

Installation

You can install the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("spyrales/gouvdown")

Palettes

gouvdown provides the official colors and a set of palettes.

pal <- gouvdown::gouv_palettes
labels <- names(pal)

do.call(
  pals::pal.bands,
  c(pal, list(labels = labels, gap = 0.2, main = "gouvdown palettes"))
)

Theme

gouvdown provides themes for {ggplot2} graphics and maps.

library(ggplot2)
library(gouvdown)
ggplot(data = iris, aes(x = Sepal.Length, y = Sepal.Width)) +
  geom_point(aes(color = Species, shape = Species)) +
  labs(
    x = "Sepal Length", y = "Sepal Width", title = "Sepal Length-Width",
    subtitle = "with theme_gouv()"
  ) +
  theme_gouv() +
  scale_color_gouv_discrete(palette = "pal_gouv_qual1")

Rmarkdown

html_document

gouvdown provides a html template for {Rmarkdown}

bookdown

gouvdown provides a bookdown project template for {bookdown}

Word output format

gouvdown provides a word template for {Rmarkdown} for writing an official letter.

References



spyrales/gouvdown documentation built on Dec. 3, 2023, 3:25 a.m.