-
Notifications
You must be signed in to change notification settings - Fork 10
/
README.Rmd
57 lines (42 loc) · 1.87 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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%",
dpi = 300
)
```
# tidypaleo
<!-- badges: start -->
[![Coverage Status](https://img.shields.io/codecov/c/github/paleolimbot/tidypaleo/master.svg)](https://codecov.io/github/paleolimbot/tidypaleo?branch=master)
[![R-CMD-check](https://github.com/paleolimbot/tidypaleo/workflows/R-CMD-check/badge.svg)](https://github.com/paleolimbot/tidypaleo/actions)
<!-- badges: end -->
Working with multi-proxy paleo-archive data can be difficult. There are multiple locations, multiple parameters, and a lot of discipline-specific norms for plot layout and notation. This package simplifies a few workflows to promote the use of R for reproducible documents in paleo-based studies.
## Installation
You can install the released versio of tidypaleo from [CRAN](https://cran.r-project.org/) with:
``` r
install.packages("tidypaleo")
```
You can install the development version from [GitHub](https://github.com) with:
``` r
# install.packages("remotes")
remotes::install_github("paleolimbot/tidypaleo")
```
## Examples
### Strat diagrams
This package exposes a number of functions useful when creating stratigraphic diagrams, including `facet_abundanceh()`, which combines several other functions to help create stratigraphic plots using **ggplot2**. The `geom_col_segsh()` geometry draws horizontal segments, which are commonly used to show species abundance data.
```{r keji-strat, message=FALSE, warning=FALSE}
library(ggplot2)
library(tidypaleo)
theme_set(theme_paleo())
ggplot(keji_lakes_plottable, aes(x = rel_abund, y = depth)) +
geom_col_segsh() +
scale_y_reverse() +
facet_abundanceh(vars(taxon), grouping = vars(location)) +
labs(y = "Depth (cm)")
```