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

Use hasName #16

Closed
helske opened this issue Oct 6, 2016 · 0 comments
Closed

Use hasName #16

helske opened this issue Oct 6, 2016 · 0 comments

Comments

@helske
Copy link
Owner

helske commented Oct 6, 2016

From R-devel: "Convenience function ‘hasName()’ has been added; it is intended to replace the common idiom ‘!is.null(x$name)’ without the usually unintended partial name matching. "

I have used the latter method several times in KFAS and the debugging has been pain... And due to partial name matching I have been resorting this kind of ugliness:
(!is.null(x[["a", exact = TRUE]]) || !is.null(x$alphahat))

@helske helske closed this as completed in dee639a Nov 10, 2016
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

No branches or pull requests

1 participant