Package: TypeInfo 1.73.0
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:
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')) |
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.
Last updated 2 months agofrom:507b15fa6c. Checks:ERROR: 1 WARNING: 6. Indexed: yes.
Target | Result | Date |
---|---|---|
Doc / Vignettes | FAIL | Nov 30 2024 |
R-4.5-win | WARNING | Nov 30 2024 |
R-4.5-linux | WARNING | Nov 30 2024 |
R-4.4-win | WARNING | Nov 30 2024 |
R-4.4-mac | WARNING | Nov 30 2024 |
R-4.3-win | WARNING | Nov 30 2024 |
R-4.3-mac | WARNING | Nov 30 2024 |
Exports:checkArgscheckReturnValuecoercehasParameterTypehasReturnTypeIndependentTypeSpecificationInheritsTypeTestinitializeparamNamesReturnTypeSpecificationshowTypeInfoSimultaneousTypeSpecificationStrictIsTypeTestTypedSignaturetypeInfotypeInfo<-
Dependencies:
Readme and manuals
Help Manual
Help page | Topics |
---|---|
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 type | checkReturnValue |
Class "ClassNameOrExpression" to represent type information as either class names or arbitrary language test | ClassNameOrExpression-class |
Class "DynamicTypeTest" for computed tests on objects. | DynamicTypeTest DynamicTypeTest-class |
Functions to query existence of specific type information | hasParameterType 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 object | paramNames 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 type | ReturnTypeSpecification |
Insert code to support type validation | rewriteTypeCheck |
Display information about argument types | showTypeInfo 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 object | TypedSignature |
Class "TypedSignature" representing type information about function parameters and the return type | hasParameterType,TypedSignature-method hasReturnType,TypedSignature-method TypedSignature-class |
Get or set type information for a function. | typeInfo typeInfo<- |
Class "TypeSpecification" and derived class | IndependentTypeSpecification-class initialize,TypeSpecifcation-method initialize,TypeSpecification-method ReturnTypeSpecification-class SimultaneousTypeSpecification-class TypeSpecification-class |