Package: TypeInfo 1.73.0

Duncan Temple Lang

TypeInfo: Optional Type Specification Prototype

A prototype for a mechanism for specifying the types of parameters and the return value for an R function. This is meta-information that can be used to generate stubs for servers and various interfaces to these functions. Additionally, the arguments in a call to a typed function can be validated using the type specifications. We allow types to be specified as either i) by class name using either inheritance - is(x, className), or strict instance of - class(x) %in% className, or ii) a dynamic test given as an R expression which is evaluated at run-time. More precise information and interesting tests can be done via ii), but it is harder to use this information as meta-data as it requires more effort to interpret it and it is of course run-time information. It is typically more meaningful.

Authors:Duncan Temple Lang Robert Gentleman

TypeInfo_1.73.0.tar.gz
TypeInfo_1.73.0.zip(r-4.5)TypeInfo_1.73.0.zip(r-4.4)TypeInfo_1.73.0.zip(r-4.3)
TypeInfo_1.73.0.tgz(r-4.4-any)TypeInfo_1.73.0.tgz(r-4.3-any)
TypeInfo_1.73.0.tar.gz(r-4.5-noble)TypeInfo_1.73.0.tar.gz(r-4.4-noble)
TypeInfo_1.73.0.tgz(r-4.4-emscripten)TypeInfo_1.73.0.tgz(r-4.3-emscripten)
TypeInfo.pdf |TypeInfo.html
TypeInfo/json (API)

# Install 'TypeInfo' in R:
install.packages('TypeInfo', repos = c('https://bioc.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

On BioConductor:TypeInfo-1.73.0(bioc 3.21)TypeInfo-1.72.0(bioc 3.20)

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

infrastructure

2.30 score 5 scripts 255 downloads 16 exports 0 dependencies

Last updated 2 months agofrom:507b15fa6c. Checks:ERROR: 1 WARNING: 6. Indexed: yes.

TargetResultDate
Doc / VignettesFAILNov 30 2024
R-4.5-winWARNINGNov 30 2024
R-4.5-linuxWARNINGNov 30 2024
R-4.4-winWARNINGNov 30 2024
R-4.4-macWARNINGNov 30 2024
R-4.3-winWARNINGNov 30 2024
R-4.3-macWARNINGNov 30 2024

Exports:checkArgscheckReturnValuecoercehasParameterTypehasReturnTypeIndependentTypeSpecificationInheritsTypeTestinitializeparamNamesReturnTypeSpecificationshowTypeInfoSimultaneousTypeSpecificationStrictIsTypeTestTypedSignaturetypeInfotypeInfo<-

Dependencies:

Readme and manuals

Help Manual

Help pageTopics
Validate the arguments in a call to a typed function.checkArgs checkArgs,function-method checkArgs,IndependentTypeSpecification-method checkArgs,InheritsTypeTest-method checkArgs,missing-method checkArgs,SimultaneousTypeSpecification-method checkArgs-methods
Verify the return value from the function has the appropriate typecheckReturnValue
Class "ClassNameOrExpression" to represent type information as either class names or arbitrary language testClassNameOrExpression-class
Class "DynamicTypeTest" for computed tests on objects.DynamicTypeTest DynamicTypeTest-class
Functions to query existence of specific type informationhasParameterType hasParameterType,function-method hasParameterType,IndependentTypeSpecification-method hasParameterType,NamedTypeTest-method hasParameterType,SimultaneousTypeSpecification-method hasParameterType,TypeSpecification-method hasReturnType hasReturnType,function-method hasReturnType,SimultaneousTypeSpecification-method hasReturnType,TypeSpecification-method
Create separate type information for different parameters.IndependentTypeSpecification
Class "NamedTypeTest" and sub-classes for tests on class of an object.coerce,character,NamedTypeTest-method InheritsTypeTest InheritsTypeTest-class NamedTypeTest-class StrictIsTypeTest StrictIsTypeTest-class
Compute the names of all the specified parameters in a TypeSpecification objectparamNames paramNames,function-method paramNames,IndependentTypeSpecification-method paramNames,NamedTypeTest-method paramNames,ReturnTypeSpecification-method paramNames,SimultaneousTypeSpecification-method paramNames,TypedSignature-method paramNames,TypeSpecification-method
Constructor for specifying information about only the return typeReturnTypeSpecification
Insert code to support type validationrewriteTypeCheck
Display information about argument typesshowTypeInfo showTypeInfo,ANY-method showTypeInfo,DynamicTypeTest-method showTypeInfo,function-method showTypeInfo,IndependentTypeSpecification-method showTypeInfo,InheritsTypeTest-method showTypeInfo,SimultaneousTypeSpecification-method showTypeInfo,StrictIsTypeTest-method showTypeInfo,TypedSignature-method
Create type signature information governing parameters in a call.SimultaneousTypeSpecification
Constructor for a TypedSignature objectTypedSignature
Class "TypedSignature" representing type information about function parameters and the return typehasParameterType,TypedSignature-method hasReturnType,TypedSignature-method TypedSignature-class
Get or set type information for a function.typeInfo typeInfo<-
Class "TypeSpecification" and derived classIndependentTypeSpecification-class initialize,TypeSpecifcation-method initialize,TypeSpecification-method ReturnTypeSpecification-class SimultaneousTypeSpecification-class TypeSpecification-class