timetostratpointbin {DAIME} | R Documentation |
This function takes a binned deposition rate to determined what stratigraphic height of a section was deposited at a given time.
This can be used to create age models, determine the location of single samples in the outcrop that were deposited at a given time, and transform isotope ratios from time into stratigraphic height (see examples).
timetostratpointbin(x, binborder, depoval)
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 |
Strictly positive vector of length |
Returns a list containing
height |
vector containing the stratigraphic heights that were deposited at the times given by the input |
time |
vector containing the times at which the stratigraphic heights given by |
Output of NA
in height
indicates that some values coincide with a hiatus or are located at places where the deposition rate is undefined.
Niklas Hohmann
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>
For an overview of the functions in the DAIME package, see its vignette (available via vignette("DAIME")
)
##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$time,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$time,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')