> I have noticed a discrepancy between is.list() and is(x, “list”)

There's a similar problem with inherits().

On R 3.5.3:

> f = function () 1
> class (f) = "f"

> is.function (f)
[1] TRUE
> inherits (f, "function")
[1] FALSE

I didn't check what happens with:
> class (f) = c ("f", "function")

However, they should have the same result, regardless.

> Is this discrepancy intentional?

I hope not.

        [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to