View source: R/char_parameters.R
| char_parameters | R Documentation |
Reads the *_charParams.csv (or .xlsx) parameter file and the
companion charcoal data file, then unpacks all analysis parameters into
named lists that mirror the MATLAB struct layout.
char_parameters(file_name)
file_name |
Path to the |
**CSV convention** (unchanged from MATLAB v1.1): the parameter file is
named <site>_charParams.csv and the companion data file is
<site>_charData.csv in the same directory. The site name is the
basename with the trailing _charParams.csv (15 characters) removed,
mirroring MATLAB's fileName(1:end-15) idiom.
**Parameter vector layout**: column 3 ("Parameters") of the CSV, rows
2-26 (25 data rows after the header), maps to positions 1-25 of the
internal charParams vector exactly as in the MATLAB codebase.
Unused zoneDiv slots are filled with -9999 in the CSV
(sentinel) or NaN in Excel; both are stripped before the list is
returned.
A named list with elements:
Numeric matrix (n_samples x 6+): cmTop, cmBot, ageTop, ageBot, charVol, charCount.
List: zoneDiv, yrInterp,
transform.
List: method, yr.
List: cPeak, threshType,
threshMethod, threshValues, minCountP,
peakFrequ, bkgSens.
List: saveFigures, save,
allFigures.
Character string: site name derived from the filename stem.
[char_validate_params()], [char_pretreatment()], [CharAnalysis()]
# Read a bundled example parameter file:
params_file <- system.file("validation", "CO_charParams.csv",
package = "CharAnalysis")
p <- char_parameters(params_file)
p$pretreatment$yrInterp # interpolation interval (yr)
p$smoothing$method # smoothing method index (1-5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.