Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Prevent writing out of bounds when final column is entirely NA #235
If a column is entirely NA, then firstNonNACol will return the index
Fix by subtracting one from the index in this case.
Hopefully fixes #234
Thanks for the report! I'll investigate.
In the future, please wait for feedback before opening a PR. The rationale for this is in the contributing guide. The change is small in this case, but changes in C code are less likely to be "trivial" than changes in R code.
Also, the unit test I added to your issue fails for your branch on "character" vectors. I suspect you simply missed that branch in the code. There should also be tests for calls where
It would be great if you add these tests to your PR and fix whatever else they uncover. Then please use