A tool to uniformly visualise graphs in 'ggplot2' using standardized Rijksoverheid (Dutch National Government) styling. This package is part of the [ROvis umbrella package] (https://github.com/rivm-syso/ROvis).
Install the latest release from R-universe:
install.packages(
"ROvis.ggplot2",
repos = c("https://rivm-syso.r-universe.dev", "https://cloud.r-project.org")
)Install the development version from GitHub:
# install.packages("pak")
pak::pak("rivm-syso/ROvis.ggplot2")A version number ending in .9000 is a development version.
A short example of on how to use the ro_gg_theme() function in combination with your ggplot-object.
library(ggplot2)
library(ROvis.ggplot2)
data |>
filter(sex == "Women") |>
ggplot(aes(x = agegroup, y = n)) +
ro_gg_theme()First point of contact for questions: ROvis team (spin@rivm.nl)
We welcome contributions! Before you start, please read CONTRIBUTING.md. It explains how to open an issue, our git etiquette (branches, commits, pull requests and reviews) and our code standards. See CONTRIBUTORS.md for the list of contributors.
For information about R package development, check the R Packages book. Below we describe the most important guidelines and practicalities.
We use the testthat, lintr and roxygen2 package for development of tests, code style
checks and automatic documentation. We also use the devtools and usethis package during
development to adhere to standards for R packages and make developing easier! Install them
in your Rstudio environment:
install.packages(testthat)
install.packages(lintr)
install.packages(roxygen2)
install.packages(quarto)
install.packages(pkgdown)
install.packages(devtools)
install.packages(usethis)Type devtools::load_all() in your console each time you start developing. This loads
all dependencies and non-exported functions in the NAMESPACE. This makes developing a lot easier!
To ensure code standardization and quality, follow these guidelines:
- Add tests with
usethis::use_test() - Add a new package dependency to the DESCRIPTION file with
usethis::use_package(). We use themin_versionargument to specify a minimum version. - Add a new function dependency to the NAMESPACE with
usethis::use_import_from() - Add documentation to new functions by inserting a roxygen skeleton and use
devtools::document()to create automatic documentation in themanfolder
This R packages was created by ROvis team (spin@rivm.nl).
The code can be re-used under license EUPL v.1.2. See LICENCE for details.
