Skip to content

using is instead of inherits #3

Open

Description

@konradmayer

is() respects conditional inheritance. However, as long as hyperSpec has no conditional superclasses they should return the same value. Should it be changed?

From the reference of inherits():
The analogue of inherits for formal classes is is. The two functions behave consistently with one exception: S4 classes can have conditional inheritance, with an explicit test. In this case, is will test the condition, but inherits ignores all conditional superclasses.

inherits(x, "hyperSpec")

inherits(x, "hyperSpec") & all(c("x", "y") %in% names(x@data))

Activity

  1. added
    question
    on Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions