Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix duplicate species in island_tbl bug #35

Merged
merged 9 commits into from
May 20, 2024
Merged

Conversation

joshwlambert
Copy link
Owner

This PR closes #34 by fixing a bug in which species get duplicated in the island_tbl from extraction (extract_island_species()) if they are nested from the ancestral state reconstruction.

A new function, rm_duplicate_island_species() is added to the package which is called in extract_island_species() to remove any duplicated species after the extraction and before the island_tbl object is returned to the user. rm_duplicate_island_species() contains two algorithms for handling duplicate species. The "split" algorithm removes the duplicate species from the oldest clade, leaving two colonists, the "group" algorithm removes the youngest clade, leaving a single larger clade. The NEWS.md is updated with a description of the new functionality.

Unit tests are added for rm_duplicate_island_species().

@joshwlambert joshwlambert added the bug Something isn't working label May 20, 2024
@joshwlambert joshwlambert merged commit a9c0459 into master May 20, 2024
6 checks passed
@joshwlambert joshwlambert deleted the fix_dupl_species branch May 26, 2024 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicated extracted species from extract_island_species()
1 participant