Changelog
Source:NEWS.md
ir 0.4.0
New functions
-
ir_scale()
: Function to scale intensity values in spectra, similar tobase::scale()
. Intensity values are scaled for the same x axis values. -
ir_as_ir.ir_flat()
: Conversion ofir_flat
objects toir
objects. -
ir_as_ir.hyperSpec()
: Conversion ofhyperSpec::hyperSpec
objects toir
objects. -
ir_as_ir.Spectra()
: Conversion ofChemoSpec::Spectra
objects toir
objects. -
ir_identify_empty_spectra()
: Identifies rows in anir
object with empty spectra (former internal functionir_check_for_empty_spectra()
). -
ir_sample_prospectr()
: Wrapper function to use sampling algorithms implemented in the ‘prospectr’ package directly with ‘ir’ objects.
Improvements
-
ir_correct_atmosphere()
has a new parameterreturn_contribution
which allows to return the contribution ofref
to each spectrum inx
. -
ir_normalize()
has three new methods to normalize spectra:- With
method = "area_absolute"
, all intensity values will be divided by the sum of the absolute intensity values at all wavenumber values of the spectrum. - With
method = "vector"
, all intensity values will be divided by the norm of the intensity vector (vector normalization). - With
method = "snv
“, a Standard Normal Variate correction will be performed.
- With
-
ir_bc_rubberband()
has an additional parameter to allow imputation of the first and last value in a spectra to avoid artifacts which may happen during baseline correction with the rubberband algorithm. - All functions now fully support empty spectra.
- Several dependencies in
Imports
have been moved toSuggests
. - Efficiency of several functions has been improved.
ir 0.3.0
Bug fixes
- In
ir_import_spc()
, the returnedir
object was not atbl_df
, but a data frame. This is now corrected. - In
unnest.ir()
, their
class was not restored and therefore the result was always unclassed. - In
ir_average()
, the returnedir
object was still agrouped_df
. This is now corrected (by adding the.groups
argument fordplyr::summarize()
which is internally used byir_average()
).
New functions
-
ir_export_prepare()
to support exportingir
objects tocsv
. -
ir_correct_atmosphere()
enables correcting for atmospheric artifacts (e.g. HO and CO peaks) following Perez-Guaita et al. (2013) (DOI: 10.1366/13-07159).
Improvements
- Making
ir_flatten()
faster by improving spectra combining. - Making
ir_bin()
faster by improving spectra summarizing per bin. Allowing to specify how wavenumber values should be defined after binning. - Arithmetic operations now also accept numeric vectors (
ir_subtract()
,ir_add()
,ir_multiply()
,ir_divide()
).
ir 0.2.1
CRAN release: 2022-05-02
- Circumventing a bug in
ir_import_spc()
by allowing to not export spectra metadata. This bug is caused byhyperSpec::read.spc()
and will be fixed in the upcoming weeks. See https://github.com/r-hyperspec/hyperSpec/issues/80
ir 0.2.0
CRAN release: 2022-04-25
- First CRAN release (#1).
- Added a
NEWS.md
file to track changes to the package. - Added tidyverse methods for
ir
objects. -
ir
objects no longer require columnsmeasurement_id
andsample_id
, but only the columnspectra
. - Added subsetting and binding methods for
ir
objects. - Added arithmetic operators for
ir
objects.