Skip to contents

This function renames a fluorophore across all relevant components of a Userm object, including fluors, matrices, data frames, and result lists. It ensures consistency of naming throughout the object and updates the Rename_table accordingly.

Usage

RenameFluor(Userm, raw_name, new_name)

Arguments

Userm

A Userm object containing fluorophore information, matrices, and results. Must include elements fluors, A, Scale_df, Intensity_mtx, Res, and Rename_table.

raw_name

A character string specifying the existing fluorophore name to be replaced. Must exist in Userm$fluors or Userm$Rename_table.

new_name

A character string specifying the new fluorophore name. Must not already exist in Userm$fluors.

Value

The updated Userm object with the fluorophore renamed consistently across all relevant slots.

Details

The function performs several checks:

  • Ensures all arguments are provided.

  • Validates that raw_name exists in Userm$fluors.

  • Ensures new_name does not already exist in Userm$fluors.

  • Updates names in fluors, A, Scale_df, Intensity_mtx, and Res.

  • Updates the Rename_table entry for the fluorophore.

If the renaming is successful, a message is printed to the console.

Examples

if (FALSE) { # \dontrun{
# Example usage:
} # }