[R] negative number to positive number

H. Paul Benton hpbenton at scripps.edu
Wed Apr 25 01:46:37 CEST 2007


Hello all,

I know this is a pretty easy question but I can't find it in S poetry or
R help.

How can I make a negative number positive. Such as
-5 to be +5
I tried +(-5), but that didn't work.

So no, I don't mean taking a -5^2 just to get a positive number.
This is in a function so it's not just -5 it's x. :)

Thanks,

Paul

-- 
Research Technician
Mass Spectrometry
   o The
  /
o Scripps
  \
   o Research
  /
o Institute



More information about the R-help mailing list