opusreader2 ⚪ ➡️ 🟠 ChemoSpec
Usage
opusreader2_to_ChemoSpec(
opusreader2_list,
groups,
names,
data_block = "ab",
gc = hyperSpec::hy_get_option("gc"),
...
)Arguments
- opusreader2_list
A
list_opusreader2.- groups
Factor with sample class assignments.
- names
Character vector with unique sample names.
- data_block
(Default:
"ab") Data block to use from the opus files. If you aren't sure which data blocks are available in your data set, use.getDataBlockNames().- gc
See
hyperSpec::hyperSpec().- ...
Arguments passed on to
to_ChemoSpecunit_frequency,unit_intensityOptional labels for the x- and y-axis.
descOptional description for plots generated with ChemoSpec.
colors_set,sym_set,alt.sym_setCharacter vector with group colors, Numeric vector with group symbol numbers, Character vector with alternative group symbols. Their length must match at least the number of levels in
groups. Groups are assigned colors based on their numeric factor level. Defaults toChemoSpecUtils::Col8,ChemoSpecUtils::Sym8andbase::letters. A color-blind friendly palette is available inChemoSpecUtils::Col7. Extended palettes are available atChemoSpecUtils::Col12,ChemoSpecUtils::Sym12, and using other packages, like RColorBrewer..strict_extra_data_names(Default: TRUE) Set this to FALSE to allow columns from
extra_datato overwrite values on theSpectraobject.
Value
A list of ChemoSpec::Spectra() objects.
Examples
if (FALSE) {
data("opusreader2_list")
spectra <- opusreader2_to_ChemoSpec(opusreader2_list, "A", 1:3 |> as.character()) |> str()
}
