The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
This package provides a simple type annotation for R that is usable in scripts, in the R console and in packages. It is intended as a convention to allow other packages or IDE’s to use the type information to provide error checking, automatic documentation or optimizations.
The annotations are syntactically valid R code rather than comments, which provides additional assurance they are specified properly. However this package does not do anything with the type annotations, they have no effect on the calculated result.
?
when used on the command line continues to work as
before, accessing the R help pages for the topic requested.
Function arguments can be annotated with types
<- function(x = 1 ? numeric) {
f + 1
x }
Default arguments can also be annotated (the =
is
required however)
<- function(x = ? numeric) {
f + 1
x }
Function statements can be annotated with types
<- function(x = "Yay") {
f paste(x, "types!") ? character
}
Function return values can be annotated with types
<- function(x = 1) {
f %% 2 == 0
x } ? boolean
The argufy
package by Gábor Csárdi was an exploration of typed arguments and
was the original impetus of the ?
syntax.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.