The University of Auckland
12 files

R scripts associated with paper " Revealing the palaeoecology of silent taxa: selecting a proxy species using modern data" by Vanderhoorn et al. (submitting for publication). Licensing conditions of the data used in this article do not allow redistribution.

Version 3 2024-02-13, 04:21
Version 2 2023-09-19, 23:39
Version 1 2023-06-01, 09:42
posted on 2023-06-01, 09:42 authored by Jacqui VanderhoornJacqui Vanderhoorn, Janet Wilmshurst, Sarah Richardson, Thomas Etherington, George PerryGeorge Perry

0_functions.R and 0_functions-for-plotting.R have custom functions for reproducing the analyses and figures in the paper. To run the analyses and figures, the input data and output data are required.

1_preparing-rasters.R aggregates the environmental raster layers from McCarthy et al. (2021) from 100 m to 250 m.

2_NVS-observations-cleaning.R filters the NVS observations down to native vascular species from native forest plots, removes sensitive information, and outputs it in a presence-only format.

3a_pairwise-cooccurrence_NECTAR.R calculates pairwise co-occurrence scores between native forest species and Beilschmiedia tawa, using a standard and resampling approach. Due to the long-run time of this script, we wrote the resampling analysis to run in parallel and ran it on a virtual machine on the Nectar research cloud.

3b_post-cooccurrence-calculations.R compares the output of the standard and resampling approaches and identifies the subset of species positively associated with B. tawa.

4_GBIF-observations-download-&-cleaning.R downloads the GBIF iNaturalist research-grade and herbarium observations for B. tawa and its positively associated species, and filters the observations to those in forested areas.

5a_prepping-climate-grid.R creates a climatic grid of New Zealand from the temperature, precipitation, and solar radiation layers used in the analysis. This is used in the climatic niche overlap analysis.

5b_prepping-spp-observations.R takes the species observations from NVS and GBIF and applies an environmental filter to reduce sampling bias. These data are passed onto the niche modelling analysis.

5c_niche-modelling-&-overlap.R takes the clean and filtered species observations and runs niche modelling with bootstrapping for B. tawa and each positively associated species.

5d_post-modelling-calculations.R takes the niche modelling and overlap output from the previous file and produces delta layers for each species against B. tawa. Also calculates the values required to plot niche overlap as a venn diagram.

all_figures.R includes code to reproduce all figures for the main text and supporting information.


Research Masters Scholarship, University of Auckland

Performance-Based Research Fund, School of Environment, University of Auckland



University of Auckland