generate_fig2: Generate Figure 2

Description Usage Arguments References Examples

View source: R/generate_fig2.r

Description

This takes the posterior values of the group level indicators generated within the generage_fig1 function and generates the boxplots presented in figure 2 of the associated paper.

Usage

1
generate_fig2(datadir, save_plot = TRUE, interval = 95)

Arguments

datadir

A filepath specifying where the posteior indicator values are saved. If outputs have not been moved, this will be in a directory "/MajorGroups/geomeans".

save_plot

Logical. If 'TRUE' plot will be saved as a PDF in 'datadir'.

interval

A number between 0 and 100 indicating the percentiles of the credible intervals to be plotted and reported. Defaults to 95%

References

Outhwaite et al (in prep) Complexity of biodiversity change revealed through long-term trends of invertebrates, bryophytes and lichens.

Outhwaite, C. L., Powney, G. D., August, T. A., Chandler, R. E., Rorke, S., Pescott, O., … Isaac, N. J. B. (2019). Annual estimates of occupancy for bryophytes, lichens and invertebrates in the UK (1970-2015). NERC Environmental Information Data Centre. https://doi.org/10.5285/0ec7e549-57d4-4e2d-b2d3-2199e1578d84

Examples

1
2
3
4
5
6
7
8
## Not run: 

# Run generate_fig2 function to produce boxplot.
# datadir should be the filepath of where the posterior indicator values are saved.
generate_fig2(postdir = paste0(getwd(), "/MajorGroups/geomeans"))


## End(Not run)

CharlieOuthwaite/UKBiodiversity documentation built on Jan. 24, 2020, 12:45 p.m.