simulateAccumulationRate {virtualPollen}R Documentation

Simulates a virtual sediment accumulation rate.

Description

Generates a virtual sediment accumulation rate to be applied to the results of simulatePopulation.

Usage

simulateAccumulationRate(
  seed=50,
  time=1:1000,
  output.min=10,
  output.max=40,
  direction=1,
  plot=TRUE
  )

Arguments

seed

integer, seed to be used by set.seed to configure the state of the pseudo-random number generator. It defines the shape of the curve.

time

vector of time values (ideally the same used to generate the simulations). Important: the time column goes from "left to right", meaning that oldest samples have the lowest values of age/time, and viceversa.

output.min

numeric, in years per centimetre, minimum sediment accumulation rate (10 by default).

output.max

numeric, in years per centimetre, maximum sediment accumulation rate (40 bu default).

direction

integer, values 1 or -1, to invert the resulting accumulation rate.

plot

boolean, plots output accumulation rate if TRUE.

Details

The accumulation rate curve is generated through a random walk smoothed by a GAM model. The value of the seed argument changes the shape of the curve, but the user has no more control than trying different values to achieve a curve closer to the desired one. If plot is set to TRUE, the accumulation rate curve is printed on screen, but not exported to pdf.

Value

A dataframe like accumulationRate, with the following columns:

Author(s)

Blas M. Benito <blasbenito@gmail.com>

See Also

simulatePopulation, aggregateSimulation

Examples


acc.rate <- simulateAccumulationRate(
 seed = 50,
 time = 1:1000,
 output.min = 10,
 output.max = 40,
 direction = 1,
 plot = TRUE
 )

str(acc.rate)


[Package virtualPollen version 1.0.1 Index]