Skip to contents

Applies a separate regex reference only to rows whose material is blank. Populated exact materials are authoritative and are never overwritten, even when a regex also matches them. A blank row is filled only when all matching patterns name one material. Distinct-material matches remain blank and are reported as clashes. Exact/regex overlaps are allowed and reported for QA. If present, match_identity is used for pattern matching while spectrum_identity remains the reported exact identity.

Usage

predict_class_reference(
  metadata,
  regex_reference,
  return = c("table", "report")
)

Arguments

metadata

A data.frame or data.table with spectrum_identity and material columns. Row order is preserved.

regex_reference

A data.frame or data.table with unique pattern and nonblank material columns.

return

Return the updated table or an audit containing data, summary, predictions, clashes, and overlaps.

Value

An updated data.table, or an audit list when return = "report".