Description Usage Arguments Details Value Author(s) See Also Examples
These are S4 methods are utilies for working with operators. In R, operators are functions with special syntax.
is.operator tests whether the object is one of the defined
operators.
can.operator tests whether the object can be coerced to an
operator.
as.operator coerced the object to an operator.
Optionally, you can specify one of the that it tests for a specific type of operator. See details, below.
1 2 3 | is.operator(x, ...)
as.operator(x,...)
can.operator(x,...)
|
x |
object to be tested or coerced. |
... |
additional arguments passed to |
An operator is R function with special syntax. They can can be one the core R operators: relational, arithmetic, tilde, single- double- or triple colon, logical, or assignment. Or it can be a user-defined operators.
( See ??operator for examples of each. )
is.operator tests whether the argumenst is an operator.
as.operator coerces x to a operator, otherwise fails.
can.operator test whether the object can be coerced to an
operator.
All functions can accepts a types argument which is passed to
link{operators}. By specifying one or more types, these functions
test or coerce using those types only.
is.operator and can.operator return logical.
as.operator returns the argument coerced to the concommitant
R function.
Christopher Brown
operators, apropos,
S4groupGeneric
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
is.operator( `+` )
is.operator( 'xyzzy' )
is.operator( `+`, types="arithmetic" )
is.operator( `+`, types="relational" )
can.operator( `+` )
can.operator( 'xyzzy' )
can.operator( `+`, types="arithmetic" )
can.operator( `+`, types="relational" )
as.operator( `+` )
as.operator( '+' )
as.operator( as.name('+') )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.