Re: [R] negative number to positive number
?abs Clint BowmanINTERNET: [EMAIL PROTECTED] Air Dispersion Modeler INTERNET: [EMAIL PROTECTED] Air Quality Program VOICE: (360) 407-6815 Department of Ecology FAX:(360) 407-7534 USPS: PO Box 47600, Olympia, WA 98504-7600 Parcels:300 Desmond Drive, Lacey, WA 98503-1274 On Wed, 25 Apr 2007 [EMAIL PROTECTED] wrote: > Quoting "H. Paul Benton" <[EMAIL PROTECTED]>: > > > 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 > > how about just multiplying it by -1??? :-) > > -5*(-1) > > Jose > > -- > Dr. Jose I. de las Heras Email: [EMAIL PROTECTED] > The Wellcome Trust Centre for Cell BiologyPhone: +44 (0)131 6513374 > Institute for Cell & Molecular BiologyFax: +44 (0)131 6507360 > Swann Building, Mayfield Road > University of Edinburgh > Edinburgh EH9 3JR > UK > > __ > R-help@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] negative number to positive number
Quoting "H. Paul Benton" <[EMAIL PROTECTED]>: > 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 how about just multiplying it by -1??? :-) -5*(-1) Jose -- Dr. Jose I. de las Heras Email: [EMAIL PROTECTED] The Wellcome Trust Centre for Cell BiologyPhone: +44 (0)131 6513374 Institute for Cell & Molecular BiologyFax: +44 (0)131 6507360 Swann Building, Mayfield Road University of Edinburgh Edinburgh EH9 3JR UK __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] negative number to positive number
Thanks Research Technician Mass Spectrometry o The / o Scripps \ o Research / o Institute Rajarshi Guha wrote: On Tue, 2007-04-24 at 16:46 -0700, H. Paul Benton wrote: 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. :) abs(x) --- Rajarshi Guha [1]<[EMAIL PROTECTED]> GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE --- C Code. C Code Run. Run, Code, RUN! PLEASE References 1. mailto:[EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] negative number to positive number
On Tue, 2007-04-24 at 16:46 -0700, H. Paul Benton wrote: > 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. :) abs(x) --- Rajarshi Guha <[EMAIL PROTECTED]> GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE --- C Code. C Code Run. Run, Code, RUN! PLEASE __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] negative number to positive number
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 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.