*️⃣ ChemoSpec
Usage
to_ChemoSpec(
data,
groups = "{missing group}",
freq = base::as.numeric(base::colnames(data)),
names = base::rownames(data),
desc = "{missing description}",
unit_frequency = "{missing frequency unit}",
unit_intensity = "{missing intensity unit}",
colors_set = ChemoSpecUtils::Col8,
sym_set = ChemoSpecUtils::Sym8,
alt.sym_set = base::letters,
extra_data = NULL,
.strict_extra_data_names = TRUE
)Arguments
- data
Numeric matrix with samples in rows and frequencies in cols.
- groups
Factor with sample class assignments or single integer or string value. Length of factor must match
nrow(data). A single value is treated as setting the same group for all samples. Defaults to"{missing group}"- freq
Numeric vector with unique frequencies. Length must match
ncol(data). Defaults tocolnames(data)castas.numeric().- names
Character vector with unique sample names. Length must match
nrow(data). Defaults torownames(data).- desc
Optional description for plots generated with ChemoSpec.
- unit_frequency, unit_intensity
Optional labels for the x- and y-axis.
- colors_set, sym_set, alt.sym_set
Character 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.- extra_data
Optional data frame with samples in rows and additional per-sample data in its columns.
colnames()ofextra_datais used to obtain names which will be used asnames()on theSpectraobject.- .strict_extra_data_names
(Default: TRUE) Set this to FALSE to allow columns from
extra_datato overwrite values on theSpectraobject.
Value
A ChemoSpec::Spectra() object.
