The function asBiomonitor is the core of the package biomonitoR. The default settings allows the user to compare and merge his dataset to the database taken from freshwaterecology.info. Compare means that the taxa list of the user’s data.frame is compared with that of reference database, after that the two are merged.
macro.asb <- asBiomonitor(macro, dfref = NULL, overwrite = F)
where macro is the user’s data.frame. This data.frame must have a column named “Taxa” where put species, genus, family, etc. names and one or more columns of samples.
When user’s taxa list contains spelling errors asBiomonitor provides suggestions to correct the wrong name if a similar name exists in the reference database. If suggestions are not provided the user has to exit from the script by pressing esc on the keyboard. This behaviour is required to assure compatibility between user data.frame and reference database. To overcome this issue the user can provide is own reference database in order to modify or replace the existing reference database.
Add custom reference data.frame to the default reference database.
macro.asb <- asBiomonitor(macro, dfref = user_db, overwrite = F)
Replace the default reference database with the custom database.
macro.asb <- asBiomonitor(macro, dfref = user_db, overwrite = T)
The structure of the custom data.frame is the topic of this post.