View source: R/ifcb_replace_mat_values.R
ifcb_replace_mat_values | R Documentation |
This 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,
do_compression = TRUE
)
manual_folder |
A character string specifying the path to the folder containing MAT classlist files to be updated. |
out_folder |
A character string specifying the path to the folder where updated MAT classlist files will be saved. |
target_id |
The target class ID to be replaced. |
new_id |
The new class ID to replace the target ID. |
column_index |
An integer value specifying which classlist column to edit. Default is 1 (manual). |
do_compression |
A logical value indicating whether to compress the .mat file. Default is TRUE. |
Python must be installed to use this function. The required python packages can be installed in a virtual environment using ifcb_py_install()
.
This function does not return any value; it updates the classlist files in the specified directory.
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.
ifcb_py_install
https://github.com/hsosik/ifcb-analysis
## Not run:
# Initialize a python session if not already set up
ifcb_py_install()
# Replace class ID 99 with 1 in .mat classlist files
ifcb_replace_mat_values("output/manual", "output/manual", 99, 1, column_index = 1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.