tests/independent.S

f =
function(x, y, z)
{
  x + y
}

typeInfo(f) <-
  IndependentTypeSpecification(x = c("integer", "numeric", "matrix"),
                               y = c("integer", "matrix"))


# f(1, 3) fails
# f(1, as.integer(3)) okay

Try the TypeInfo package in your browser

Any scripts or data that you put into this service are public.

TypeInfo documentation built on Nov. 8, 2020, 5:40 p.m.