Look at the implementation of equals for integer64
variables.
`==.integer64`
function (e1, e2)
{
a <- binattr(e1, e2)
e1 <- as.integer64(e1)
e2 <- as.integer64(e2)
ret <- logical(max(length(e1), length(e2)))
.Call("EQ_integer64", e1, e2, ret)
a$class <- minusclass(a$class, "integer64")
setattributes(ret, a)
ret
}
The return value is explicitly given a class attribute equal to the class of a
, minus the class "integer64"
.
binattr
, that creates the variable a
is a rather odd function that checks that the two inputs are of a compatible size, then returns the attributes of one or the other, depending upon which ones have a dim
attribute.