Skip to content
Prev 165922 / 398502 Next

Power functions?

Please post to only one of

r-help at r-project.org
r-help at stat.math.ethz.ch

not to both, as the same list then got two copies.
On Sat, 3 Jan 2009, rkevinburton at charter.net wrote:

            
See ?Syntax, linked from ?`^` :

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

        '[ [['             indexing
        ':: :::'           access variables in a name space
        '$ @'              component / slot extraction
        '^'                exponentiation (right to left)
        '- +'              unary minus and plus

so -1^2 is -(1^2) not (-1)^2.