timetostratpointbin: Transform Points and Isotope Ratios from Time into...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/timetostratpointbin.R

Description

This function takes a binned deposition rate to determined what stratigraphic height of a section was deposited at a given time. Essentially a wrapper of pointtransform(...,direction='time to height',depositionmodel='binned deposition rate') kept for backwards compatibility of the package. It is recommended to use pointtransform instead of this function.

Usage

1
timetostratpointbin(x, binborder, depoval)

Arguments

x

Vector containing the times whose stratigraphic heights are to be determined

binborder

Vector of strictly increasing numerical values. Defines the borders of the bins in time

depoval

Vector of length length(binborder)-1. Defines the deposition rate in the bins, i.e. depoval[i] is the deposition rate in the time interval between binborder[i] and binborder[i+1]

Value

Returns a list containing

height

vector containing the stratigraphic heights that were deposited at the times given by the input x

age

vector containing the ages at which the stratigraphic heights given by height were deposited. Essentially a duplicate of the input x

Output of NA in height indicates that some values coincide with a hiatus or are located at places where the deposition rate is undefined.

Author(s)

Niklas Hohmann

References

Hohmann, Niklas. 2018. Quantifying the Effects of Changing Deposition Rates and Hiatii on the Stratigraphic Distribution of Fossils. <doi:10.13140/RG.2.2.23372.51841>

See Also

pointtransform for the more general function underlying this wrapper

For an overview of the functions in the DAIME package, see its vignette (available via vignette("DAIME") )

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
##Define deposition rate
binborder=1:6 #temporal bins for the deposition rate
depoval=c(5,4,3,1,2) #deposition rate in the bins
#plot deposition rate
depositionrate=approxfun(binborder,c(depoval,tail(depoval,1)),method="constant",yleft=NA,yright=NA)
plot(depositionrate(seq(from=min(binborder),to=max(binborder),length.out=100)),xlab='time',
  ylab='deposition rate', main='Deposition rate')

##at what stratigraphic height can an object be found that was deposited in the 
##sediment after 5 time units?
timetostratpointbin(5,binborder,depoval) 

##create age model
#points that will be transformed into stratigraphic height
time=seq(from=min(binborder),to=max(binborder),length.out=100) 
reslist=timetostratpointbin(time,binborder,depoval)
#plot age model
plot(reslist$height,reslist$age,type='l',ylab='Time',xlab='Stratigraphic Height',main='Age model')

## Age model with removal of sediment (hiatus)
depoval=c(5,4,-3,1,2) #in the midle time bin, erosion rate is 3
reslist=timetostratpointbin(time,binborder,depoval)
#plot age model. the gap represents the hiatus
plot(reslist$height,reslist$age,type='l',ylab='Time',xlab='Stratigraphic Height',
  main='Age model with erosion')
#A object deposited in the sediment after 3.5 time units is destroyed due to the hiatus:
timetostratpointbin(3.5,binborder,depoval) 

##transform isotope ratio curves
depoval=c(5,4,2,1,0.1)
#create fake ratios and sample locations
sampletime=sort(runif(20,min=min(binborder),max=max(binborder))) #times where the samples were taken
isotoperatio=sin(sampletime)*rnorm(length(sampletime)) #isotope ratios
plot(sampletime,isotoperatio,type='l',xlab='Time',ylab='Isotope Ratio')
#!!transform only (!) sample times, NOT isotope values!!
reslist=timetostratpointbin(sampletime,binborder,depoval)
#this is the resulting isotope ratio curve in stratigraphic height
plot(reslist$height,isotoperatio,type='l',xlab='Stratigraphic Height',ylab='Isotope Ratio')

DAIME documentation built on March 13, 2020, 2:54 a.m.