# Generate an example geochemical data set, using a stochastic model
ex=ar1(npts=1001)
# the first column in 'ex' is depth (m), and we will take the second column to be CaCO3
# rescale second column to range from 0-100% CaCO3
m=100/(max(ex[2])-min(ex[2]))
b=100-(m*max(ex[2]))
ex[2]= m*ex[2] +b
autoPlot(ex)
# generate example sedimentation rate history, with a stepwise tripling
# from 1m/kyr to 3m/kyr at 500 m
sr=ex
sr[1:500,2]=1
sr[501:1001,2]=3
autoPlot(sr)
# calculate accumulation rates
res=accum(dat=ex,sedrate=sr,density=2.65)
Run the code above in your browser using DataLab