fishR-Core-Team / FSA

FSA (Fisheries Stock Assessment) package provides R functions to conduct typical introductory fisheries analyses.
https://fishr-core-team.github.io/FSA/
GNU General Public License v2.0
66 stars 22 forks source link

See if `NA`s for species can be dealt with in `addZeroCatch()` #42

Closed droglenc closed 6 years ago

droglenc commented 6 years ago

Some samples will contain no fish and thus may have an NA for the species variable (as would generally happen if the sample data is left_join()ed with the fish data. The current addZeroCatch() cannot deal with this problem (the NAs cause an error).

droglenc commented 6 years ago

See example from Chris Michaud for a possible solution. However, see if the problem can be dealt with with table()s.

droglenc commented 6 years ago

This was not a problem in the original if the species variable is not a factor. Thus, did not change anything.