This function clean species eDNA data in terms of species names.
species_clean_function(spygen_matrix)A dataframe of species eDNA in the format site X species.
A list containing three objects :
A dataframe in the format site X species with new species names checked from FishBase;
A dataframe in the format site X species with old species names before checking from FishBase;
A character vector listing all removed species.
The function removes all misidentified species (missing names, identified at the family level or as spp., sp., all species not spelled in the binomial format).
Once misidentified species has been removed, the function check the correct names of remaining species from FishBase.
Caution : this function only convert data to a suitable format for analysis, with only basic cleaning step. This does not exempt users from checking the list of species returned by the functions (e.g., species detected outside their distribution range).