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

refactor: Use 'inherits(name)' instead of 'class() == name' #104

Merged
merged 1 commit into from
Oct 13, 2022
Merged

refactor: Use 'inherits(name)' instead of 'class() == name' #104

merged 1 commit into from
Oct 13, 2022

Conversation

trevorld
Copy link
Contributor

Eliminates the following R CMD check NOTE:

❯ checking R code for possible problems ... NOTE
  Found if() conditions comparing class() to string:
  File ‘nanotime/R/nanotime.R’: if (!missing(to) && !is.null(to) && !(class(to) == "nanotime")) ...
  Use inherits() (or maybe is()) instead.

@eddelbuettel
Copy link
Owner

Excellent catch.

Could you be so kind to also add ChangeLog entry? Two spaces between date, name, email, tab on the next line. Or just C-x 4 in Emacs :)

Eliminates the following `R CMD check` NOTE:

```
❯ checking R code for possible problems ... NOTE
  Found if() conditions comparing class() to string:
  File ‘nanotime/R/nanotime.R’: if (!missing(to) && !is.null(to) && !(class(to) == "nanotime")) ...
  Use inherits() (or maybe is()) instead.
```
@trevorld
Copy link
Contributor Author

Okay, I've added a ChangeLog entry.

Copy link
Owner

@eddelbuettel eddelbuettel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@eddelbuettel eddelbuettel merged commit 7574003 into eddelbuettel:master Oct 13, 2022
@eddelbuettel
Copy link
Owner

Thanks so much -- and all done!

@trevorld trevorld deleted the inherits-note branch October 13, 2022 20:39
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.

2 participants