View source: R/simulateAccumulationRate.R
simulateAccumulationRate | R Documentation |
Generates a virtual sediment accumulation rate to be applied to the results of simulatePopulation
.
simulateAccumulationRate( seed=50, time=1:1000, output.min=10, output.max=40, direction=1, plot=TRUE )
seed |
integer, seed to be used by |
time |
vector of time values (ideally the same used to generate the simulations). Important: the |
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 |
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.
A dataframe like accumulationRate
, with the following columns:
time: numeric, time or age of the given case.
accumulation.rate: numeric, in years per centimetre, simulated accumulation rate.
grouping: integer, grouping variable to aggregate together (with aggregateSimulation
) samples deposited in the same centimetre according accumulation.rate.
Blas M. Benito <blasbenito@gmail.com>
simulatePopulation
, aggregateSimulation
acc.rate <- simulateAccumulationRate( seed = 50, time = 1:1000, output.min = 10, output.max = 40, direction = 1, plot = TRUE ) str(acc.rate)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.