generate_suppfig2: Generating Supplementary Figure 2

Description Usage Arguments References Examples

View source: R/generate_suppfig2.r

Description

This generates version of figure 1 but with subsets of species based on the number of records available for the occupancy estimation.

Usage

1
generate_suppfig2(postdir, sp_trends, status = TRUE, save_plot = TRUE)

Arguments

postdir

A filepath specifying where the posterior combinations are saved.

sp_trends

A dataframe, downloaded from the repository which details the species level trends in occupancy and the years for which data were avaialble for each species.

status

Logical. If 'TRUE' the progress through each group and number of records subset will be printed to the console.

save_plot

Logical. If 'TRUE', the plot will be saved as a PDF file within the 'outdir'. Default is 'TRUE'.

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
 9
10
11
## Not run: 

# Run generate_fig1 function
# postdir should be the filepath of where the 4 major group level posteriors
# combinationss are saved.
generate_fig2supp(postdir = paste0(getwd(), "/MajorGroups"),
sp_trends = read.csv(paste0(datadir, "/Species_Trends.csv")),
outdir = paste0(getwd(), "/MajorGroups"))


## End(Not run)

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