patterntransform: Transform patterns between stratigraphic height and time/age

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

View source: R/patterntransform.R

Description

This function (1) takes temporal patterns and determines the corresponding stratigraphic patterns or (2) takes stratigraphic patterns and reconstructs the underlying temporal patterns.

These patterns can for example be rates of (first/last) fossil occurrences, rates of morphological change, or input rates into the sediment, e.g. of geochemical proxies.

Usage

1
2
3
patterntransform ( xdep , ydep , xpat , ypat ,  direction = 'time to height' ,
depositionmodel = 'piecewise linear deposition rate' ,  patternmode = 'piecewise linear' ,
pos=NULL , hiatuslist=list() ,unit = 'time per sediment',timetype='time' )

Arguments

xdep

Vector of strictly increasing real numbers

ydep

Vector of real numbers. xdep and ydep describe the deposition model, and how they are interpreted depends on the option depositionmodel (and when direction='height to time', also on the option unit). By default, xdep and ydep describe a piecewise linear deposition rate, i.e. deporate=approxfun(xdep,ydep). For more options on how to describe deposition models, see depositionmodel below

xpat

Vector of strictly increasing real numbers

ypat

Vector containing positive real numbers. xpat and ypat describe the pattern to be transformed. By default, it is taken to be piecewise linear and is accordingly given by pattern=approxfun(xpat,ypat). The option patternmode allows to change to binned patterns (see below). Whether the input pattern is a temporal or a stratigraphic pattern is determined by direction

direction

OPTIONAL, default is 'time to height'. Determines the direction of the transformation. Either 'time to height' (in which case the input pattern described by xpat and ypat is interpreted as a temporal pattern and will be transformed into a stratigraphic pattern) or 'height to time' (in which case the input pattern described by xpat and ypat is interpreted as a stratigraphic pattern and will be transformed into a temporal pattern)

depositionmodel

OPTIONAL, default is 'piecewise linear deposition rate'. Either 'piecewise linear deposition rate', 'binned deposition rate', or 'age model'. Determines how the input of xdep and ydep is interpreted. Dependent on the choice of direction and depositionmodel, different restrictions on the input of ydep exist, for details and examples see the vignette (available via vignette('DAIME') or the error messages

patternmode

OPTIONAL, default is 'piecewise linear'. Either 'piecewise linear' or 'binned'. Determines whether xpat and ypat are taken as a piecewise linear or a binned description of the pattern. In the first case, length(xpat) needs to match length(ypat), and the pattern is given by approxfun(xpat,ypat). In the second case, length(xpat) needs to match length(ypat)+1, and the value of the pattern between the xpat[i] and xpat[i+1] is given by ypat[i]

pos

OPTIONAL, default is NULL. A vector of points that will be transformed and then used determine the value of the pattern at these points. In the default setting, the number and location of points is chosen automatically

hiatuslist

OPTIONAL, default is an empty list. List of hiatuses to be included into the transformation, only used when direction='height to time', e.g. the transformation is from stratigraphic height to time. A list, containing vectors of length two as elements. Every element in the list corresponds to a hiatus: hiatuslist[[i]][1] is the stratigraphic height of the i-th hiatus, and hiatuslist[[i]][2] is its duration

unit

OPTIONAL, default is 'sediment per time'. Only used when direction='height to time', e.g. the transformation is from stratigraphic height to time, and deposition model is 'piecewise linear deposition rate' or 'binned deposition rate'. Either 'sediment per time' or 'time per sediment'. Determines the unit of the (binned or piecewise linear) deposition rate in the sense that if unit='sediment per time', the deposition rate describes the deposition rate with which a given point in the section was deposited. If unit='time per sediment', the deposition rate describes the time needed to deposit one unit of sediment

timetype

OPTIONAL, default is "time". Either "time" or "age", determines whether input/output will be interpreted/given as time or age

Value

Returns a list with two elements. If direction='time to height', these elements are

height

vector containing stratigraphic heights

val

vector containing the values of the stratigraphic pattern (=transformed temporal pattern) at the stratigraphic heights given by height

report

A short summary of the task performed

If direction='height to time' and timetype='time', these elements are

time

vector containing points in time

val

vector containing the values of the temporal pattern (=transformed stratigraphic pattern) at the points in time given by time

report

A short summary of the task performed

If direction='height to time' and timetype='age', these elements are

age

vector containing ages

val

vector containing the values of the temporal pattern (=transformed stratigraphic pattern) at the ages given by age

report

A short summary of the task performed

Output of NA in age,time, height, or val indicates that some values coincide with a hiatus or intervals where the deposition model 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

For an overview of the functions in the DAIME package and examples using stratigraphic data see the vignette (available via vignette('DAIME') )

pointtransform for the transformation of points

patterntodepositionmodel to create deposition models based in sedimentary dilution/condensation of known patterns

strattotimeratebin, strattotimeratecont, timetostratratebin, and timetostratratecont for diverse (outdated) wrappers of patterntransform.

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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
### Example 1: transform patterns from time into the section
##define (piecewise linear) 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)
#Plot deposition rate
plot(my.xdep,my.ydep,type='l',main='Deposition Rate',xlab='Time', ylab='Sediment per Time Unit',
  ylim=c(0,max(my.ydep))) 
##define (piecewise linear) temporal pattern, here fossil occurrences
patternname='Fossil Occurrences'
my.temp.pat.x= seq(from=min(my.xdep),to=max(my.xdep),length.out=100)
my.temp.pat.y=splinefunH(x=c(0,4,12),y=c(0.5,2,0.5),m=c(0,0,0))(my.temp.pat.x)  

plot(my.temp.pat.x,my.temp.pat.y,type='l',main=paste(patternname,'in time'),
  xlab='Time',ylab=patternname,ylim=c(0,max(my.temp.pat.y)))
##transform temporal pattern into stratigraphic pattern
strat.pat=patterntransform(xdep=my.xdep,ydep=my.ydep,xpat=my.temp.pat.x,ypat=my.temp.pat.y,
  direction = 'time to height' , depositionmodel = 'piecewise linear deposition rate' ,
  patternmode = 'piecewise linear')
strat.pat$report
my.strat.pat.x=strat.pat$height
my.strat.pat.y=strat.pat$val
plot(my.strat.pat.x,my.strat.pat.y,type='l',xlab='Stratigraphic Height',
ylab=patternname, main=paste(patternname,' in the section'))

## Variation: modify deposition rate to include erosion
my.xdep2=my.xdep
my.ydep2=splinefunH(x=c(0,2,4,6,8,10,12),y=c(1,5,6,-2,5,1,6),m=c(0,1.5,-0.5,-0.5,0,0.5,0))(my.xdep2)
#Plot deposition rate
plot(my.xdep2,my.ydep2,type='l',main='Deposition Rate',xlab='Time',ylab='Sediment per Time Unit')
lines(range(my.xdep2),c(0,0))
strat.pat2=patterntransform(xdep=my.xdep2,ydep=my.ydep2,xpat=my.temp.pat.x,ypat=my.temp.pat.y,
  direction = 'time to height' , depositionmodel = 'piecewise linear deposition rate' ,
  patternmode = 'piecewise linear')
strat.pat2$report
my.strat.pat.x2=strat.pat2$height
my.strat.pat.y2=strat.pat2$val
plot(my.strat.pat.x2,my.strat.pat.y2,type='l',xlab='Stratigraphic Height',
  ylab=patternname,main=paste(patternname,' in the section'),ylim=c(0,1))
#the spike is because the deposition rate is very small when it transitions from 
#negative to positive, generating a punctual extreme condensation

### Example 2: Transform patterns from the section into time
patternname='Fossil Occurrences'
#piecewise linear 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)
## Same pattern, this time interpreted as stratigraphic pattern
my.strat.pat.x= seq(from=min(my.xdep),to=max(my.xdep),length.out=100)
my.strat.pat.y=splinefunH(x=c(0,4,12),y=c(0.5,2,0.5),m=c(0,0,0))(my.strat.pat.x)
plot(my.strat.pat.x,my.strat.pat.y,type='l',main=paste(patternname,'in the section'),
  xlab='Stratigraphic Height',ylab=patternname,ylim=c(0,max(my.strat.pat.y)))

##interpret deposition rate as inverse deposition rate with the unit "time per sediment"
usedunit='time per sediment'
plot(my.xdep,my.ydep,type='l',main=paste('Deposition Rate as',usedunit),
  xlab='Stratigraphic Height',ylab=usedunit,ylim=c(0,max(my.ydep)))
#transform pattern
temp.pat1=patterntransform(xdep=my.xdep,ydep=my.ydep,xpat=my.strat.pat.x,ypat=my.strat.pat.y,
  direction = 'height to time' , depositionmodel = 'piecewise linear deposition rate' ,
  patternmode = 'piecewise linear', unit=usedunit)
temp.pat1$report
#plot result
plot(temp.pat1$time,temp.pat1$val,type='l',xlab='Time',
  ylab=patternname,main=paste(patternname, 'in time'),ylim=c(0,max(temp.pat1$val)))
  
##take the deposition rate as ordinary deposition rate with unit "sediment per time"
usedunit='sediment per time'
plot(my.xdep,my.ydep,type='l',main=paste('Deposition Rate as',usedunit),
xlab='Stratigraphic Height',ylab=usedunit,ylim=c(0,max(my.ydep)))
#transform pattern
temp.pat2=patterntransform(xdep=my.xdep,ydep=my.ydep,xpat=my.strat.pat.x,ypat=my.strat.pat.y,
  direction = 'height to time' ,depositionmodel = 'piecewise linear deposition rate' ,
  patternmode = 'piecewise linear', unit=usedunit)
temp.pat2$report
#plot result
plot(temp.pat2$time,temp.pat2$val,type='l',xlab='Time',
  ylab=patternname,main=paste(patternname, 'in time'),ylim=c(0,max(temp.pat2$val)))
#Note the big difference in the resulting patterns in time depending on the unit used.

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