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

Test and fix reordering of positions. #29

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

blongworth
Copy link
Contributor

Bchronology() output age and position were getting shuffled when the input data were not ordered by position. For instance, a surface sample in my data was given a depth corresponding to another sample in the output. Reordering my data frame by position fixed this.

Looking into the code, I think predictPositions was getting created before the data were reordered by position, causing the indexing issue. Doing the reordering first seems to fix the error. I did not thoroughly check that this move doesn't change anything else.

I added a test for this, but testthat doesn't like that I'm running code that produces the reordering warning outside of a test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant