ifcb_replace_mat_values.RdThis function replaces a target class ID with a new ID in MATLAB classlist files, generated by the code in the `ifcb-analysis` repository (Sosik and Olson 2007).
ifcb_replace_mat_values(
manual_folder,
out_folder,
target_id,
new_id,
column_index = 1
)A character string specifying the path to the folder containing MAT classlist files to be updated.
A character string specifying the path to the folder where updated MAT classlist files will be saved.
The target class ID to be replaced.
The new class ID to replace the target ID.
An integer value specifying which classlist column to edit. Default is 1 (manual).
This function does not return any value; it updates the classlist files in the specified directory.
This function requires a python interpreter to be installed. The required python packages can be installed in a virtual environment using `ifcb_py_install`.
Sosik, H. M. and Olson, R. J. (2007), Automated taxonomic classification of phytoplankton sampled with imaging-in-flow cytometry. Limnol. Oceanogr: Methods 5, 204–216.
if (FALSE) {
# Replace class ID 99 with 1 in .mat classlist files
ifcb_replace_mat_values("output/manual", "output/manual", 99, 1, column_index = 1)
}