-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.qmd
More file actions
87 lines (63 loc) · 2.58 KB
/
Copy pathREADME.qmd
File metadata and controls
87 lines (63 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
---
format: gfm
---
<!-- README.md is generated from README.qmd. Please edit that file -->
```{r}
#| label: setup
#| include: false
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# spellbind <a href="https://rladies.org/spellbind/"><img src="man/figures/logo.png" align="right" height="139" alt="spellbind website" /></a>
<!-- badges: start -->
[](https://github.com/rladies/spellbind/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/rladies/spellbind)
[](https://rladies.r-universe.dev/spellbind)
<!-- badges: end -->
spellbind is the RLadies+ brand toolkit for R.
It gives you colour palettes, a ggplot2 theme, colour/fill scales, and branded R Markdown templates so that everything your chapter produces looks like it belongs together.
## Installation
Install from the [RLadies r-universe](https://rladies.r-universe.dev/):
```r
install.packages("spellbind", repos = "https://rladies.r-universe.dev")
```
Or the development version from GitHub:
```r
# install.packages("pak")
pak::pak("rladies/spellbind")
```
## Colours
The brand palette has three primary colours — purple, blue, and rose — plus neutrals and tints for each.
```{r}
#| label: colours
library(spellbind)
rladies_cols("purple", "blue", "rose")
```
## ggplot2 theme and scales
`theme_rladies()` pairs with `scale_colour_rladies()` and `scale_fill_rladies()` to give plots a consistent branded look.
```{r}
#| label: plot-example
#| fig-alt: "Scatter plot of iris sepal dimensions coloured by species using the RLadies+ palette"
library(ggplot2)
ggplot(iris, aes(Sepal.Length, Sepal.Width, colour = Species)) +
geom_point(size = 2.5) +
scale_colour_rladies() +
theme_rladies() +
labs(title = "Iris sepal dimensions")
```
Nine palettes are available — `"main"`, `"full"`, `"purple"`, `"blue"`, `"rose"`, `"neutral"`, `"diverging"`, `"light"`, and `"dark"`.
See `?rladies_pal` for details.
## R Markdown templates
Three branded templates ship with the package, available from RStudio's _File > New File > R Markdown > From Template_ menu:
- **RLadies+ HTML** — `spellbind::rladies_html`
- **RLadies+ PDF** — `spellbind::rladies_pdf`
- **RLadies+ Xaringan** — slide deck with brand CSS
## Getting started
```r
vignette("spellbind")
```
Or browse the [pkgdown site](https://rladies.org/spellbind/).