Description Usage Arguments Details Value Author(s) See Also Examples
These S4 Methods are utilies for working with operators. In R, operators are functions with special syntax.
1 | is.operator(x, ...)
|
x |
object to be tested or coerced. Can be |
... |
additional arguments passed to |
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.
An operator is R function with special syntax.
( 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 using those types
only.
New operators can be "registered" using setOperator
.
is.operator
and can.operator
return logical.
as.operator
returns the argument coerced to the concommitant R
function.
Christopher Brown
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
## Not run:
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('+') )
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.