Package: simplerspec 0.2.1

simplerspec: Soil and plant spectroscopic model building and prediction

Functions that cover reading of spectral data, outlier removal, spectral preprocessing, calibration sampling, PLS regression using caret, and model diagnostic statistics and plots.

Authors:Philipp Baumann [aut, cre]

simplerspec_0.2.1.tar.gz
simplerspec_0.2.1.zip(r-4.5)simplerspec_0.2.1.zip(r-4.4)simplerspec_0.2.1.zip(r-4.3)
simplerspec_0.2.1.tgz(r-4.4-any)simplerspec_0.2.1.tgz(r-4.3-any)
simplerspec_0.2.1.tar.gz(r-4.5-noble)simplerspec_0.2.1.tar.gz(r-4.4-noble)
simplerspec_0.2.1.tgz(r-4.4-emscripten)simplerspec_0.2.1.tgz(r-4.3-emscripten)
simplerspec.pdf |simplerspec.html
simplerspec/json (API)
NEWS

# Install 'simplerspec' in R:
install.packages('simplerspec', repos = c('https://philipp-baumann.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/philipp-baumann/simplerspec/issues

Datasets:
  • soilspec_yamsys - Soil spectra and laboratory reference data from Baumann et al.

On CRAN:

3.52 score 33 stars 10 scripts 32 exports 88 dependencies

Last updated 1 years agofrom:60e120130c. Checks:OK: 1 NOTE: 6. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 20 2024
R-4.5-winNOTENov 20 2024
R-4.5-linuxNOTENov 20 2024
R-4.4-winNOTENov 20 2024
R-4.4-macNOTENov 20 2024
R-4.3-winNOTENov 20 2024
R-4.3-macNOTENov 20 2024

Exports:%>%assess_multimodelsaverage_spcbind_lcols_dtscreate_vip_rectsevaluate_modelextract_lcols2dtsextract_pls_vipfit_plsfit_rfgather_spcjoin_chem_specjoin_spc_chemmerge_dtsmerge_dts_lplot_pls_vipplot_spcplot_spc_extpls_ken_stonepredict_from_spcpreprocess_spcread_asdread_asd_binread_opus_bin_univread_opus_univremove_outliersresample_spcselect_ref_spcselect_spc_varsslice_xvaluessplit_df2lsummary_df

Dependencies:backportsbroomcaretclasscliclockcodetoolscolorspacecowplotcpp11data.tableDEoptimRdiagramdigestdplyre1071fansifarverforeachfuturefuture.applygenericsggplot2globalsgluegowergtablehardhathexViewipredisobanditeratorsKernSmoothlabelinglatticelavalifecyclelistenvlubridatemagrittrMASSmathjaxrMatrixmgcvModelMetricsmodelrmunsellmvoutliernlmennetnumDerivparallellypillarpkgconfigplsplyrpROCprodlimprogressrprospectrproxypurrrR6RColorBrewerRcppRcppArmadillorecipesreshape2rlangrobustbaserpartscalessgeostatshapeSQUAREMstringistringrsurvivaltibbletidyrtidyselecttimechangetimeDatetzdbutf8vctrsviridisLitewithr

Readme and manuals

Help Manual

Help pageTopics
Assess multiple pairs of measured and predicted valuesassess_multimodels
Average spectra in list-column by entries in grouping columnaverage_spc
Bind list-columns within a tibble into a list of data.tablesbind_lcols_dts
Create a data frame containing start and end positions (wavenumbers) where variable importance in projection (VIP) is > 1create_vip_rects
Calculate model evaluation metricsevaluate_model summary_df
Extract multiple tibble list-columns and return data as list of data.tablesextract_lcols2dts
Extract VIPs (variable importance in the projection) for a PLS regression model output returned from model fitting with 'simplerspec::fit_pls()'extract_pls_vip
Calibration sampling, model tuning, and PLS regressionfit_pls pls_ken_stone
Calibration sampling, and random forest model tuning and evaluationfit_rf
Gather measurements of different spectra types, corresponding x-axis values and metadata from nested list.gather_spc
Join chemical and spectral data framesjoin_chem_spec
Join spectra data and chemical data tibblesjoin_spc_chem
Merge list-columns of spectra, x-axis values, metadata and additional measured variables into a single long form data.tablemerge_dts
Wrapper function around 'merge_dts()' for list of tibbles to aggregate data for plotting.merge_dts_l
Plot stacked ggplot2 graphs with the Variable Importance for the Projection (VIP) scores, mean replicate spectra (absorbance) per sample_id, and the preprocessed spectra.plot_pls_vip
Plot tibble spectraplot_spc
ggplot2 wrapper for extended spectra plottingplot_spc_ext
Predict soil properties of new spectra based on a list of calibration modelspredict_from_spc
Preprocess spectrapreprocess_spc
Read ASD fieldspec spectrometer data export into into simplerspec spectra tibble.read_asd
Read ASD binary files and gather spectra and metadata in tibble data frame.read_asd_bin
Read a Bruker OPUS spectrum binary fileread_opus_bin_univ
Read a list of Bruker OPUS spectrum binary files.read_opus_univ
Remove outlier spectraremove_outliers
Resample spectra in list-column to new x-axis intervalresample_spc
Select a set of reference spectra to be measured by reference analysis methodsselect_ref_spc
Select every n-th spectral variable for all spectra and x-values in spectral tibble ('spc_tbl')select_spc_vars
Slice spectra into defined x-axis rangesslice_xvalues
Soil spectra and laboratory reference data from Baumann et al. (2021)soilspec_yamsys
Split a tibble data frame into a list of tibbles by a group columnsplit_df2l