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

More efficient code using rlang::inherits_any() #114

Open
pepijnvink opened this issue Jul 20, 2023 · 1 comment
Open

More efficient code using rlang::inherits_any() #114

pepijnvink opened this issue Jul 20, 2023 · 1 comment

Comments

@pepijnvink
Copy link
Collaborator

E.g. instead of
if(is.matrix(x) | is.data.frame(x){ }
use
if(inherits_any(x, c("matrix", "DataFrame"))){ }

@hanneoberman
Copy link
Member

Use this in #138

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

2 participants