pointtransform {DAIME} | R Documentation |
Transform points between stratigraphic height and time/age
Description
This function (1) takes times/ages and determines the stratigraphic heights that were deposited at said times/ages or (2) takes stratigraphic heights and determines their time/age of deposition.
This can be used to (1) reconstruct the age/time/stratigraphic height of single objects placed in the sediment (2) construct age models from deposition rates and (3) transform (isotope) ratios or percentages from stratigraphic height into time/age and vice versa (see examples).
Usage
pointtransform( points , xdep , ydep ,
direction = 'time to height' , depositionmodel = 'piecewise linear deposition rate' ,
hiatuslist = list() , unit = 'time per sediment', timetype='time')
Arguments
points |
Vector containing points that are transformed. Whether the entries in |
xdep |
Vector of strictly increasing real numbers |
ydep |
Vector of real numbers. |
direction |
OPTIONAL, default is |
depositionmodel |
OPTIONAL, default is |
hiatuslist |
OPTIONAL, default is an empty list. List of hiatuses to be included into the transformation, only used when |
unit |
OPTIONAL, default is 'sediment per time'. Only used when |
timetype |
OPTIONAL, default is "time". Either "time" or "age", determines whether input/output will be interpreted/given as time or age |
Value
If timetype='time'
a list containing:
time |
Vector containing the times at which the stratigraphic heights in |
height |
Vector containing stratigraphic heights that were deposited at the times given in |
report |
A short summary of the task performed |
If timetype='age'
a list containing:
age |
Vector containing the ages at which the stratigraphic heights in |
height |
Vector containing stratigraphic heights that were deposited at the ages given in |
report |
A short summary of the task performed |
If direction='time to height'
, age
/time
is a duplicate of the input points
, and height
contains the stratigraphic heights that were deposited at the ages/times given by points
.
If direction='height to time'
, height
is a duplicate of the input points
, and age
/time
contains the ages/times at which the stratigraphic height given by points
were deposited.
Output of NA
in a vector indicates that the transformation was unsuccessful. This happens when entries of points
coincide with a hiatus or are not in the domain of definition of the deposition model.
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
For an overview of the functions in the DAIME package and examples using stratigraphic data see the vignette (available via vignette('DAIME')
)
patterntransform
for the transformation of input rates (stratigraphic patterns into temporal patterns and vice versa)
patterntodepositionmodel
to create deposition models based on sedimentary dilution/condensation of known patterns
strattotimepointbin
, strattotimepointcont
, timetostratpointbin
, and timetostratpointcont
for diverse (outdated) wrappers of pointtransform
.
Examples
### Example 1: Determine age/stratigraphic height of single objects
##define deposition rate
my.xdep=seq(0,12,length.out=100)
my.ydep=splinefunH(x=c(0,2,4,6,8,10,12),y=c(1,5,6,1,0.5,1,6),m=c(0,1.5,-0.5,-0.5,0,0.5,0))(my.xdep)
#unit of deposition rate is sediment per time unit (default setting)
usedunit='sediment per time' #unit of deposition rate is sediment per time unit (default setting)
#Plot deposition rate (in stratigraphic height)
plot(my.xdep,my.ydep,type='l',main='Deposition Rate',xlab='Stratigraphic Height',ylab=usedunit,
ylim=c(0,max(my.ydep)))
##at what time was the object found at stratigraphic height 9 deposited?
#using default setting for depositionmodel (depositionmodel = 'piecewise linear deposition rate')
pointtransform(points=9,xdep=my.xdep,ydep=my.ydep,direction='height to time', unit=usedunit)
#change unit used
usedunit='time per sediment'
pointtransform(points=9,xdep=my.xdep,ydep=my.ydep,direction='height to time', unit=usedunit)
#note how different the results are!
##Now, take deposition rate as deposition rate in time
##at what stratigraphic height will an object appear that was deposited at time 5?
pointtransform(points=5,xdep=my.xdep,ydep=my.ydep,direction='time to height')
#The option "unit" is unused when transforming from time to height
### Example 2: Create Age models based on a deposition rate
##create an age model. Essentially transform many points, which then approximate the age model
stratheights=seq(min(my.xdep),max(my.xdep),length.out=1000) #many points to approx. age model
usedunit='sediment per time'
reslist=pointtransform(points=stratheights,xdep=my.xdep,ydep=my.ydep,
direction='height to time',unit=usedunit)
reslist$report
agemodelage=reslist$time
agemodelheight=reslist$height
#plot age model
plot(agemodelage,agemodelheight,xlab='Time',ylab='Stratigraphic Height',
main=paste('Age model based on deposition rate \n with unit',usedunit))
#create age model but with other units for sedimentn input
usedunit='time per sediment'
reslist=pointtransform(points=stratheights,xdep=my.xdep,ydep=my.ydep,
direction='height to time',unit=usedunit)
reslist$report
agemodelage=reslist$time
agemodelheight=reslist$height
#plot age model (note the difference the setting of unit makes in terms of time
#required to deposit the section!)
plot(agemodelage,agemodelheight,xlab='Time',ylab='Stratigraphic Height',
main=paste('Age model based on deposition rate \n with unit',usedunit))
##create age model with a hiatus 1: height to time
stratigraphicheight=5 #strat. height of the hiatus
duration=10 #duration of the hiatus
my.hiatuslist=list(c(stratigraphicheight,duration)) #required input format for hiatuses
reslist=pointtransform(points=stratheights,xdep=my.xdep,ydep=my.ydep,
direction='height to time',hiatuslist=my.hiatuslist)
reslist$report
agemodelage=reslist$time
agemodelheight=reslist$height
#!using default setting for unit (sediment per time) again!
plot(agemodelage,agemodelheight,xlab='Time',ylab='stratigraphic height')
#the gap corresponds to the hiatus
##create age model with a hiatus 2: time to height
my.xdep2=c(0,6,8,12)
my.ydep2=c(0,6,5,12)
plot(my.xdep2,my.ydep2,type='l',main='Age Model, not eroded',xlab='time',ylab='height')
reslist=pointtransform(points=stratheights,xdep=my.xdep2,ydep=my.ydep2,
direction='time to height',depositionmodel='age model')
reslist$report
agemodelage=reslist$time
agemodelheight=reslist$height
plot(agemodelage,agemodelheight,xlab='Time',ylab='stratigraphic height'
,main='Age model, eroded (with hiatus)')
###Example 3: Transform (isotope) ratios
##define deposition rate
my.xdep3=seq(0,12,length.out=100)
my.ydep3=splinefunH(x=c(0,2,4,6,8,10,12),y=c(1,5,6,1,0.5,1,6),
m=c(0,1.5,-0.5,-0.5,0,0.5,0))(my.xdep3)
#create fake (oxygen) isotope curves
samplelocation=seq(0,12,length.out=20) #where the samples are taken
isotoperatio=(-1)^(0:19) +0.2*0:19
plot(my.xdep3,my.ydep3,type='l',ylim=c(0,7),xlab='Stratigraphic Height',ylab='')
lines(samplelocation,isotoperatio,type='l',lwd=4)
legend('topleft',lwd=c(1,4),legend=c('Deposition rate','(Isotope) ratio'))
#transform only (!) sample locations, NOT values
#again using the default setting for unit
reslist=pointtransform(points=samplelocation,xdep=my.xdep3,ydep=my.ydep3,
direction='height to time')
#Isotope ratios in time
plot(reslist$time,isotoperatio,type='l',xlab='Time',ylab='Isotope Ratio',lwd=4)