Skip to content

Get rid of PB NA warning and improve NA handling overall.#11

Open
MilesMcBain wants to merge 1 commit into
davidcsterratt:masterfrom
MilesMcBain:master
Open

Get rid of PB NA warning and improve NA handling overall.#11
MilesMcBain wants to merge 1 commit into
davidcsterratt:masterfrom
MilesMcBain:master

Conversation

@MilesMcBain

@MilesMcBain MilesMcBain commented Feb 28, 2018

Copy link
Copy Markdown

I was going to make a fix just for #10 but then I noticed some issue with the way NA is handled. If NA accidentally makes its way into a parameter, the whole thing will be wiped and replaced with a default. I think this is unexpected and it would be kinder to the user to stop and notify as with P.

I made some explicit checks for a length 1 NA instead of any(is.na(param)), which is more precisely the case you wish to handle.

If you are prepared to accept this pull, don't merge immediately, let me know and I'll add a few tests. :)

@davidcsterratt

Copy link
Copy Markdown
Owner

A long time has passed - apologies for the long delay replying and thank you for the PR. If you are still interested, I'd be happy to consider a pull request with tests.

@mdsumner

mdsumner commented Jan 6, 2024

Copy link
Copy Markdown
Contributor

I'll do that if Miles cannot

@davidcsterratt

Copy link
Copy Markdown
Owner

I'd be happy for either of you to do this - I'm guessing that with the elapsed time, this project might not be relevant for Miles any more?

@MilesMcBain

Copy link
Copy Markdown
Author

You have my blessing @mdsumner. I must admit to having completely dropped all context relating to this.

@mdsumner

Copy link
Copy Markdown
Contributor

I actually think this is covered by #9, I think we just happened to hit on the same problem at the same time.

Happy to follow up if there's more to do but I think our PRs give equivalent behaviour. I'll try to look at testing at some point.

@mdsumner

Copy link
Copy Markdown
Contributor

ah, I see that this PR adds more checks - having a closer look

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.

3 participants