Major restructuring: The models originally included with the ‘irpeat’ package are now stored in a separate data package ‘irpeatmodels’ to reduce the size of the ‘irpeat’ package. The ‘irpeatmodels’ package can be installed from Zenodo.
Add a new class irp_prediction_domain: This class stores the prediction domain for a model. Methods available are: Conversion from ir and ir_flat objects, plotting, check whether spectra in an ir object are within a prediction domain.
For existing and new models: Training and testing prediction domains were added and can now be used to check whether the models cannot be used to make reliable predictions.
By default, functions return Posterior
New functions
Add irp_preprocess_for(): Allows to extract the spectra after automated preprocessing as they would be used to make predictions.
Updated irp_preprocess(), model preprocessing configurations, and prediction functions to consider the new arguments (1) new_x_type from ir::ir_bin(), (2) bc_do_impute from ir::ir_bc(), (3) do_return_as_ir (allows to return the preprocessed spectra as ir object).
Update the documentation: Adding explicit warnings to irp_content_klh_hodgkins(), irp_content_kl_hodgkins_model, and irp_content_h_hodgkins_model that the related models are not reliable for peat.
Bug fixes
Correct a typo which made it impossible to compute holocellulose_2 with irp_content() (now: irp_predict(), see below).
irp_content_klh_hodgkins_predict(): The function now checks that spectra have the correct wavenumber range.
irp_eac_1(), irp_edc_1(): Both functions now also accept ir objects with empty spectra as arguments.
irpeat 0.1.0
Added a NEWS.md file to track changes to the package.
Update the documentation (adding missing examples).
Add pkgdown site.
Bug fixes
Fix bugs caused by changes in ‘ir’ 0.2.0 (ir::ir_check_ir() no longer is exported, measurement_id is no longer a required column in ir objects).
Fix bug in irp_content() if variable = "klason_lignin_hodgkins" (no values were computed).
New models
New models to predict holocellulose (model_holocellulose_2) and Klason lignin (model_klason_lingin_2) contents.