Wiley
Browse
1/1
8 files

Supplement 1. Sample R code of all analyses in the manuscript in addition to R code and instructions for computing mantel correlograms.

dataset
posted on 2016-08-10, 07:22 authored by Nicholas B. Elliot, Samuel A. Cushman, Andrew J. Loveridge, Godfrey Mtare, David W. Macdonald

File List

sample r.code for analyses.r (MD5: 3ad040a4b47e5c38250d884d848b20b4)

autocorrelation_instructions.txt (MD5: 6a45be561fc291f0b839037e41071cc3)

dist.r (MD5: 09ad5d0540934a9439460470338a91b3)

lower.r (MD5: 0aed5dacd78f61faf9c1254b5028dc2f)

mgram.r (MD5: 045af1702d206ccd42ad0e8820adbca5)

read_write.r (MD5: 09e1b8304a844e26745dda0993afa72e)

xy_t.r (MD5: 90931395a8b9eca68d6eee94965d7d73)

Description

sample r.code for analyses.r contains r code for all analyses in the manuscript.

autocorrelation_instructions.txt contains instructions for computing mantel correlograms

read_write.r reads the originally formatted path windows and selects the x, y and decimal days columns, writes it to a new file.

xy_r.r splits the dataset into two -- one with x and y, and one with decimal days

dist.r calculates Euclidean distance on the x,y and the decimal days, creating matrix of distance between points, and matrix of time apart for points

lower.r turns this distance into a lower triangular matrix (needed for mgram)

mgram.r runs the mantel correlogram for each window with a step size of one day, and writes the results to .csv files

History