operators: Return the names of defined operators

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

operators returns the names of defined operators.

Usage

1
  operators(types = NULL)

Arguments

types

A character vector with types of operators to return. The types may one or more of: 'namespace', 'component', 'indexing', 'sequence', 'arithmetic', 'relational', 'logical', 'tilde', 'assignment', 'help' or one of the special groups: 'ALL', 'CORE', 'SPECIAL', 'USER'

Details

operators provides the names of defined operators. These can be either CORE language operators or 'SPECIAL' operators defined by the %any% syntax. By default, i.e. when types=NULL, all operators are returned.

The core operators are:

namespace :: :::
component @ $
indexing \[ \[\[
sequence :
arithmetic + - * / ^ %% %/%
relational < > <= >= == != %in% %!in%
logical ! & && | ||
tilde ~
assignment <- <<- -> ->> =
help ?

types may also be one a special operator groupings:

Value

character vector of unique operator names.

Note

The right arrow assignment operators, -> and ->> is not an operator but a syntatic variant. Consequently, it does not behave properly as an operator. They are omitted from the operator list as they are not correctly identified as primitives or functions by the R language.

Author(s)

Christopher Brown

References

http://cran.r-project.org/doc/manuals/R-lang.html https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14310

See Also

Syntax, setOperator, and help files on varios operators

Examples

1
2
3
4
5
6
7
  operators()
  operators( types="arithmetic" )
  operators( types=c("arithmetic","logical" ) )
  operators( types='ALL' )
  operators( types='CORE' )
  operators( types='SPECIAL' )
  operators( types='USER' )

operators documentation built on May 2, 2019, 6:48 p.m.