Skip to content

Conversation

@MichaelChirico
Copy link

class() is not guaranteed to return an object of length 1, so statements like if (class(x) == "y") are problematic since this is often a vector comparison inside a scalar logical operator (if).

I fixed a few of these for illustration, but many more remain in the package. You can see them with lintr::lint_package(linters = lintr::class_equals_linter()).

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.

1 participant