toggle.sign {formula.tools}R Documentation

toggle the sign of an expression

Description

toggle the sign of an expression

Usage

toggle.sign(x)

Arguments

x

expression

Details

'toggle.sign' changes the sign of an expression for '+' tp '-' and visa-versa.

Examples


  toggle.sign(1:3)
  toggle.sign( quote(a) )
  toggle.sign( quote(-a) )
  
  exp <- expression( a, -b, -(a-b) )
  toggle.sign(exp)
  

[Package formula.tools version 1.7.1 Index]