Syntax                 package:base                 R Documentation

_O_p_e_r_a_t_o_r _S_y_n_t_a_x

_D_e_s_c_r_i_p_t_i_o_n:

     Outlines R syntax and gives the precedence of operators

_D_e_t_a_i_l_s:

     The following unary and binary operators are defined.  They are
     listed in precedence groups, from highest to lowest.

       '[ [['             indexing
       '::'               name space/variable name separator
       '$ @'              component / slot extraction
       '^'                exponentiation (right to left)
       '- +'              unary minus and plus
       ':'                sequence operator
       '%any%'            special operators
       '* /'              multiply, divide
       '+ -'              (binary) add, subtract
       '< > <= >= == !='  ordering and comparison
       '!'                negation
       '&  &&'            and
       '| ||'             or
       '~'                as in formulae
       '-> ->>'           rightwards assignment
       '='                assignment (right to left)
       '<- <<-'           assignment (right to left)
       '?'                help (unary and binary)

     Within an expression operators of equal precedence are evaluated
     from left to right except where indicated.

     The links in the *See Also* section covers most other aspects of
     the basic syntax.

_N_o_t_e:

     There are substantial precedence differences between R and S.  In
     particular, in S '?' has the same precedence as '+ -' and '& && |
     ||' have equal precedence.

_R_e_f_e_r_e_n_c_e_s:

     Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S
     Language_. Wadsworth & Brooks/Cole.

_S_e_e _A_l_s_o:

     'Arithmetic', 'Comparison', 'Control', 'Extract', 'Logic', 'Paren'

     The _R Language Definition_ manual.

