What is new

5/03/2026

New release, 0.15.0 is out and the tutorial text has been revised accordingly.

This release contains numerous improvements, bug fixes, and new methods. The main highlights are a standalone DD-SIMCA implementation, overhauled preprocessing pipelines (with some breaking changes), and JSON/CSV interoperability with the mda.tools web-applications.

New dedicated methods for DD-SIMCA

In the previous version, DD-SIMCA was implemented via more versatile method simca, which also lets you use other SIMCA implementations. While versatility is generally good, it limited the DD-SIMCA possibilities and it was decided to implement it separately.

Method ddsimca can now be used for training, testing, and applying Data Driven SIMCA models. It matches functionality of the corresponding web-application, including all plots and figures of merit (for example estimation of beta, selectivity, etc.). It also lets you change decision boundary parameters without rebuilding the main model.

The original method simca is still available (and always will) for compatibility.

Improvements to preprocessing methods

There are several new methods for preprocessing, including:

  • prep.spikes() for cosmic spikes removal from Raman spectra.
  • prep.center() for centering of data columns.
  • prep.scale() for scaling of data columns.
  • prep.emsc() for extended multiplicative scatter correction.

The following methods are considered deprecated, you can still use them (they will be kept for compatibility), but for new code it is recommended to use the alternatives:

  • prep.autoscale() — use prep.center() and prep.scale() instead.
  • prep.snv() — use prep.norm() with parameter type = "snv" as an alternative.
  • prep.msc() — use prep.emsc() with parameter degree = 0.
  • employ.prep() — use prep.apply() instead.

In addition to that, the ability to combine the preprocessing methods together into a preprocessing chain (we will call it preprocessing model) has been improved. However, these improvements cause breaking changes, so if you used this feature before, check the text below and the updated user guides very carefully.

First of all, the syntax for creating preprocessing items for combining them into the chain has changed — parameters are now passed as named arguments instead of a list:

  • Old: prep("savgol", list(width = 7, porder = 2, dorder = 2))
  • New: prep("savgol", width = 7, porder = 2, dorder = 2)

Also, the option to add user defined preprocessing methods into a preprocessing model has been removed as it caused issues and unstable behavior in some cases. From this version, only selected methods can be combined into a preprocessing model. You can see a full list of the currently supported methods by running prep.list(). This list will be extended eventually. And you can still use user defined methods and methods which are not in the list separately.

Second, a preprocessing model can now be integrated directly into pca, pls, simca, ddsimca, and plsda via the prep parameter — the model will train the preprocessing pipeline and apply it automatically during calibration and prediction.

Finally, preprocessing methods can also be trained independently using prep.fit(), which pre-computes parameters that depend on the training set (e.g. values for centering, scaling, or the reference spectrum for EMSC). Applying the trained preprocessing model to new data is done with prep.apply().