# NOT RUN {
##import return waveform data
data(return)
ind<-c(1:nrow(return))
return<-data.frame(ind,return)
x<-return[1,] ###must be must be a dataset incluing intensity with index at the beginning.
peakfind(x) ## index, estimated A, u, and sig
##to get accurate estimates of A, u,g, you need to explore your dataset to optimized parameters.
##generally thres affects a lot, assigning smooth to TRUE is preferable in most of cases.
#for the whole dataset
dr<-apply(return,1,peakfind)
####to manage data and store in a data frame.
rpf<-do.call("rbind",lapply(dr,"[[",1))
# }
Run the code above in your browser using DataLab