The R Project SVN R

Rev

Rev 59039 | Rev 61823 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 59039 Rev 59616
Line 1... Line 1...
1
% File src/library/base/man/Syntax.Rd
1
% File src/library/base/man/Syntax.Rd
2
% Part of the R package, http://www.R-project.org
2
% Part of the R package, http://www.R-project.org
3
% Copyright 1995-2011 R Core Team
3
% Copyright 1995-2012 R Core Team
4
% Distributed under GPL 2 or later
4
% Distributed under GPL 2 or later
5
 
5
 
-
 
6
% = is treated specially in the parser: see PR#14595
-
 
7
 
6
\name{Syntax}
8
\name{Syntax}
7
\alias{Syntax}
9
\alias{Syntax}
8
\title{Operator Syntax and Precedence}
10
\title{Operator Syntax and Precedence}
9
\description{
11
\description{
10
  Outlines \R syntax and gives the precedence of operators
12
  Outlines \R syntax and gives the precedence of operators.
11
}
13
}
12
\details{
14
\details{
13
  The following unary and binary operators are defined.  They are listed
15
  The following unary and binary operators are defined.  They are listed
14
  in precedence groups, from highest to lowest.
16
  in precedence groups, from highest to lowest.
15
  \tabular{ll}{
17
  \tabular{ll}{
Line 26... Line 28...
26
    \code{!}\tab negation\cr
28
    \code{!}\tab negation\cr
27
    \code{&  &&}\tab and\cr
29
    \code{&  &&}\tab and\cr
28
    \code{| ||}\tab or\cr
30
    \code{| ||}\tab or\cr
29
    \code{~}\tab as in formulae\cr
31
    \code{~}\tab as in formulae\cr
30
    \code{-> ->>}\tab rightwards assignment\cr
32
    \code{-> ->>}\tab rightwards assignment\cr
31
    \code{=}\tab assignment (right to left)\cr
-
 
32
    \code{<- <<-}\tab assignment (right to left)\cr
33
    \code{<- <<-}\tab assignment (right to left)\cr
-
 
34
    \code{=}\tab assignment (right to left)\cr
33
    \code{?}\tab help (unary and binary)\cr
35
    \code{?}\tab help (unary and binary)\cr
34
  }
36
  }
35
  Within an expression operators of equal precedence are evaluated
37
  Within an expression operators of equal precedence are evaluated
36
  from left to right except where indicated.
38
  from left to right except where indicated.  (Note that \code{=} is not
-
 
39
  necessarily an operator.)
37
 
40
 
38
  The binary operators \code{::}, \code{:::}, \code{$} and \code{@} require
41
  The binary operators \code{::}, \code{:::}, \code{$} and \code{@} require
39
  names or string constants on the right hand side, and the first two
42
  names or string constants on the right hand side, and the first two
40
  also require them on the left.
43
  also require them on the left.
41
 
44