-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
66 lines (46 loc) · 1.63 KB
/
README.Rmd
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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(dev = "ragg_png")
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# cousepkg
<!-- badges: start -->
<!-- badges: end -->
Cousepkg is a custom ggplot2 theme and ultilizes `ggtext::element_markdown()`.
## Installation
`cousepkg` requires the install of the [IBM Plex Sans](https://github.com/IBM/plex/). The package relies on [systemfonts](https://systemfonts.r-lib.org/) for access to system fonts.
install development version from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("joeycouse/cousepkg")
```
## Example
This is a basic example which shows you how to solve a common problem:
```{r example, fig.dpi=300, fig.height = 7}
library(tidyverse)
library(cousepkg)
theme_set(theme_couse())
mtcars %>%
ggplot(aes(x = as.factor(cyl)))+
geom_bar(aes(fill = as.factor(cyl)))+
labs(x = 'Cylinders',
y = '**Count**',
title = 'Total Cars by Cylinders',
subtitle = '*Eight cylinder vehicles are most common*',
caption = 'There are many cars!',
fill = "*Cylinders*") +
theme(legend.position = c(0.15, 0.95),
panel.grid.minor.x = element_blank(),
panel.grid.major.x = element_blank(),
legend.direction = "horizontal")
```
## Source
cousepkg is largely inspired by data visualizations from [juliasilge](https://github.com/juliasilge) and her personal R Package [silgelib](https://github.com/juliasilge/silgelib)