spectrace_plot_clusters: Plot clustered spectrace data

View source: R/spectrace_plot_clusters.R

spectrace_plot_clustersR Documentation

Plot clustered spectrace data

Description

Plot clustered spectrace data

Usage

spectrace_plot_clusters(
  lightData,
  lightData.PCA = NULL,
  classification = NULL,
  sil.scores = NULL,
  samplesize = NULL
)

Arguments

lightData

Data frame containing the (calibrated) light data. Data needs to be in wide format (see spectrace_to_wide). Must contain a 'cluster_id' column.

lightData.PCA

(Optional) data frame containing the principal components after PCA of the lightData. Must contain a 'cluster_id' column. Defaults to NULL.

classification

(Optional) data frame with classification per cluster. Must contain a 'cluster_id' column, a 'spectrum_id'column with the name of the predicted spectrum, and the spectral data of each predicted spectrum in the same resolution as 'lightData'.

sil.scores

(Optional) data frame with silhouette scores per cluster. Must contain a 'cluster_id' and 'sil_score' column. Defaults to NULL.

samplesize

(Optional) Integer, indicating the size of the random sample of spectra plotted per cluster. Defaults to NULL.


steffenhartmeyer/spectrace documentation built on Dec. 4, 2024, 4:13 p.m.