getintervals_time: Generate interval file, binning by time

View source: R/getintervals.R

getintervals_timeR Documentation

Generate interval file, binning by time

Description

This function generates an interval file, which is the master file for controlling all downstream PleistoDist calculations. This file essentially simplifies Pleistocene-era sea level change into a number of discrete time intervals.

Usage

getintervals_time(
  time,
  intervals,
  outdir,
  sealvl = PleistoDist::bintanja_vandewal_2008
)

Arguments

time

Maximum time cutoff in kya. PleistoDist calculates the average distance between islands over a user-defined period of time. Users will have to specify an upper time bound (in thousands of years (kya)) for their PleistoDist analysis, which by default ranges from 0.1 kya to 3000 kya (i.e. 100 to 3,000,000 years ago). The lower time bound is fixed at the present day (0 kya).

intervals

Number of time interval bins to generate between the present day and the time-cutoff. More time intervals will lead to more fine-grained geomorphology calculations, at the expense of increased computational time. Under default conditions, the number of intervals should not exceed time-cutoff*10.

outdir

Output directory for the interval file. If the specified output directory doesn't already exist, PleistoDist will create the output directory.

sealvl

Optional parameter defining the sea level reconstruction file. By default, PleistoDist uses the sea level reconstruction from Bintanja & van de Wal (2008). If you use a custom sea level reconstruction file, make sure the file has a Time column (in kya) and a Sealevel_Corrected column (in metres), and is saved in CSV format.

Value

An interval file in the automatically-generated 'output' folder. This interval file is needed for all downstream PleistoDist analyses

Examples

#create temp directory
path <- file.path(tempdir())
#generate 5 time-binned intervals, with a cutoff of 5kya,
#using default sea-level reconstruction by Bintanja & Van de Wal (2008)
getintervals_time(time=5,intervals=5,outdir=path)
#if using sea-level reconstruction by Spratt & Lisecki (2016)
getintervals_time(time=5,intervals=5,outdir=path,sealvl=PleistoDist::spratt_lisecki_2016)

g33k5p34k/PleistoDistR documentation built on Oct. 9, 2022, 5:27 a.m.