RamanWrapper | R Documentation |
I wanted to run the diffractometry peak-analysis code (which can be both
time-consuming and prone to stray errors halting compilation) without the need
to re-run the peak analysis every time the document is re-compiled.
For that purpose, I created this wrapper function.
Its job is to call Ramanpk
only if necessary (i.e., peak analysis
has not already been performed). That is made possible by saving the results
of a successful analysis to a file on disk (in the current working directory).
Also includes an override option to force re-running of peak analysis.
RamanWrapper( data.exp, run, override = FALSE, kerpk = 1, fitmaxiter = 50, gam = 0.6, scl.factor = 0.1, tau = 2, maxwdth = 200, jobfile = "" )
data.exp |
dataframe with experimental data (format?) |
run |
index |
override |
force re-running of peak analysis |
kerpk |
number of kernels per peak (passed to Ramanpk()) |
fitmaxiter |
number of max iterations while attempting fit (passed to Ramanpk()) |
gam |
gam (passed to Ramanpk()) |
scl.factor |
sclerosis factor (passed to Ramanpk()) |
tau |
tau (passed to Ramanpk()) |
maxwdth |
peak max width (passed to Ramanpk()) |
jobfile |
path to datafile saved to disk, defaults to ./raman-peak-data.rda |
a Ramanpk dataframe
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.