Learn R Programming

doubt (version 0.1.0)

register_dubious_syntaxes: Register Dubious Syntaxes

Description

To use a dubious syntax in a package, use this function in the definition of .onAttach

Usage

register_dubious_syntaxes(syntaxes)

Arguments

syntaxes

a character vector of the syntaxes to support

Examples

Run this code
# NOT RUN {
# define your syntax as you would define a normal function
`?add> {x} : {y}` <- function(x, y) x + y

# register the syntax in your .onAttach definition
.onAttach <- function(libname, pkgname) {
doubt::register_dubious_syntaxes("?add> {x} : {y}")
invisible()
}
# }

Run the code above in your browser using DataLab