toggle.sign: toggle the sign of an expression

Description Usage Arguments Details Examples

View source: R/toggle.sign.R

Description

toggle the sign of an expression

Usage

1

Arguments

x

expression

Details

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

Examples

1
2
3
4
5
6
7
  toggle.sign(1:3)
  toggle.sign( quote(a) )
  toggle.sign( quote(-a) )
  
  exp <- expression( a, -b, -(a-b) )
  toggle.sign(exp)
  

formula.tools documentation built on May 2, 2019, 1:45 p.m.