TypedSignature: Constructor for a TypedSignature object

Description Usage Arguments Value Author(s) See Also Examples

View source: R/Classes.S

Description

This is a constructor function for the TypedSignature-class that represents constraints on the types or values of a combination of parameters. It takes named arguments that identify the types of the parameters. Each parameter type should be an object that is “compatible with” ClassNameOrExpression-class, i.e. a test for inheritance or a dynamic expression.

Usage

1
TypedSignature(..., returnType, obj = new("TypedSignature", list(...)))

Arguments

...

the types for the parameters given as name = type to identify the parameter and its type description.

returnType

the type description for the return value. This applies to the particular combination of inputs given in ...

obj

the instance to populate with the information given in the other arguments. This allows us to pass in objects of sub-classes to this function or to populate previously created objects.

Value

The populated value of obj, by default an object of class TypedSignature-class.

Author(s)

Duncan Temple Lang <duncan@wald.ucdavis.edu>

See Also

SimultaneousTypeSpecification typeInfo checkArgs

Examples

1
 TypedSignature(x = "logical", y = quote(length(y) == length(x)))

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