https://github.com/capro-uio/uiothemes
Package to download package source files, and for package dependencies, to port into TSD UIO
https://github.com/capro-uio/uiothemes
branding r uio
Last synced: 5 months ago
JSON representation
Package to download package source files, and for package dependencies, to port into TSD UIO
- Host: GitHub
- URL: https://github.com/capro-uio/uiothemes
- Owner: capro-uio
- License: cc-by-4.0
- Created: 2020-10-26T12:08:02.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-08-16T18:26:13.000Z (over 1 year ago)
- Last Synced: 2024-08-03T22:19:53.947Z (8 months ago)
- Topics: branding, r, uio
- Language: HTML
- Homepage: https://www.capro.dev/uiothemes/
- Size: 1.01 MB
- Stars: 14
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE.md
Awesome Lists containing this project
- jimsghstars - capro-uio/uiothemes - Package to download package source files, and for package dependencies, to port into TSD UIO (HTML)
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# uiothemes
[](https://CRAN.R-project.org/package=uiothemes)
[](https://github.com/Athanasiamo/uiothemes/actions)
[](https://travis-ci.com/Athanasiamo/uiothemes)The goal of uiothemes is to provide branded templates for the University of Oslo for commonly used R markdown packages.
Currently the package contains:- Presentation template for the [xaringan](https://slides.yihui.org/xaringan/#1)-package
- Tutorial template for the [learnr](https://rstudio.github.io/learnr/)-package
- Website template for the [distill](https://rstudio.github.io/distill/website.html)-package
- Article template for the [distill](https://rstudio.github.io/distill/basics.html)-package
- Themes for the [ggplot2](https://ggplot2.tidyverse.org/)-package
- Colour and fill scales for the [ggplot2](https://ggplot2.tidyverse.org/)-package## Installation
You can install uiothemes from github
```{r, eval = FALSE}
# install.packages("remotes")
remotes::install_github("Athanasiamo/uiothemes")
```## Basic use
xaringan presentation, learnr tutorial and distill article templates with UiO branding can be access easily using the RStudio IDE, by selecting `File` -> `R markdown ...` -> `From Template`.
```{r, echo = FALSE, out.width="50%"}
knitr::include_graphics("man/figures/README-template.png")
```Distill website template can be access most easily through the RStudio IDE to create a new project.
`File` -> `New project...` -> `New Directory` -> `UiO Distill Website````{r, echo = FALSE, out.width="50%"}
knitr::include_graphics("man/figures/README-project.png")
```**Previews**
```{r, echo = FALSE, out.width="50%", fig.cap=c("Distill article", "Xaringan presentation", "Learnr tutorial", "Distill website")}
knitr::include_graphics(list.files("man/figures/", "preview", full.names = TRUE))
```### ggplot2 branding
The ggplot branding is applied through themes and scales.
```{r, fig.retina=3}
library(uiothemes)
library(ggplot2)ggplot(mtcars, aes(mpg, disp, colour = cyl)) +
geom_point(size = 5) +
scale_colour_uio(discrete = FALSE) +
theme_uio() +
labs(title = "The fonts and colours are UiO specific",
subtitle = "and can provide coherent plot branding")ggplot(mtcars, aes(mpg, disp, colour = cyl)) +
geom_point(size = 5) +
scale_colour_uio(palette = "redwhite", discrete = FALSE) +
theme_uio_dark() +
labs(title = "The fonts and colours are UiO specific",
subtitle = "and can provide coherent plot branding")```