Open mhpob opened 3 years ago
Gotcha, good catch. Been fiddling with a better approach to editing names.
They're tough to sort out in any type of efficient way. A nested ifelse() could help:
lengths[, lengths := ifelse(lengths == 'fundulus heterclitus', 'fundulus heteroclitus',
ifelse(lengths == 'hypsoblennius hentz ', 'hypsoblennius hentz', lengths))]
dplyr::case_when is probably the easiest, though. data.table::fcase requires you to list all of the different options. case_when doesn't.
A few scientific names got left behind in #1:
And possible to figure out which species the blanks (
lengths$scientific == ""
) belong to?