Description Usage Arguments Value Examples
calculate the running integral for the selected peak
1 |
x |
x axis for the intergration |
y |
y axis for the intergration |
pks |
selected peak |
TAP |
if TRUE will apply a baseline using tangent area proportional (default=FALSE) |
linear |
if TRUE will apply a linear baseline (default=FALSE) |
... |
parameters in TAPPA function |
ds data frame containing original x and y given as input
ri running integral
b.tap baseline calculate if the switch TAP is TRUE
y.tap = y - b.tap
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #' require(data.table)
require(MASS)
rates=c(0.5,1,2,5,10,20,50)
a<-lapply(rates, function(x) JMA(A=exp(35),Ea=120000,T0=0,T.end=300,q=x,npoints=5000,n=2))
a<-lapply(seq(1,length(a)), function(x) data.table(a[[x]]$time.s,a[[x]]$T.C,
a[[x]]$dadT, rates[[x]]))
lapply(seq(1,length(a)), function(x) setnames(a[[x]],
c("time.seconds","temperature.s","heat.flow","rates") ) )
a.dt <-lapply(seq(1,length(a)), function(x) data.table(data.frame(a.check[[x]])))
a<-rbindlist(a.dt)
a$rate<-a$id
a.peaks <- a[,.(res.list = list(findpeaks(heat.flow,sortstr=TRUE,npeaks=2))),by=id]
a.peaks$rate<-a.peaks$id
ref.peak=1
a.peaks <- data.table(data.table(a.peaks$rate),rbindlist((lapply(a.peaks$res.list,
function(x) data.table(t(x[ref.peak,]))))))
colnames(a.peaks)<- c("rate","peak.value","ind.max","left.lim","right.lim")
a.mat<- lapply(unique(a$rate),function(x)
ri(a[a$rate==x]$time.seconds,a[a$rate==x]$heat.flow,a.peaks[rate==x]))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.