Smith, Phil
2006-Mar-20 19:28 UTC
[R] Special characters: plus/minus - a method that works
Dear R-people: François Michonneau's method to obtain the special character plus/minus works on Windows 2000 professional. Many Thanks to François for his work! Phil Smith Centers for Disease Control and Prevention Atlanta, GA _____ From: François MICHONNEAU [mailto:francois.michonneau@gmail.com] Sent: Monday, March 20, 2006 1:58 PM To: r-help@stat.math.ethz.ch; Smith, Phil Subject: Re: [R] Special characters: plus/minus Hello, You can obtain the special character plus/minus by a copy from the MS Windows "Character Table" and paste it in the R console or in your text editor as (NotePad or Emacs). Then, you can use it in your script: x <- 5 y <- 0.25 paste (x, "±", y) Cheers François Michonneau [[alternative HTML version deleted]]
Gabor Grothendieck
2006-Mar-21 01:09 UTC
[R] Special characters: plus/minus - a method that works
Another way that works on my Windows XP system is to use "\261" . On 3/20/06, Smith, Phil <pzs6 at cdc.gov> wrote:> Dear R-people: > > Fran?ois Michonneau's method to obtain the special character plus/minus works on Windows 2000 professional. > > Many Thanks to Fran?ois for his work! > > Phil Smith > Centers for Disease Control and Prevention > Atlanta, GA > > _____ > > From: Fran?ois MICHONNEAU [mailto:francois.michonneau at gmail.com] > Sent: Monday, March 20, 2006 1:58 PM > To: r-help at stat.math.ethz.ch; Smith, Phil > Subject: Re: [R] Special characters: plus/minus > > > Hello, > > You can obtain the special character plus/minus by a copy from the MS Windows "Character Table" and paste it in the R console or in your text editor as (NotePad or Emacs). Then, you can use it in your script: > x <- 5 > y <- 0.25 > paste (x, "?", y) > > Cheers > > Fran?ois Michonneau > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > R-help at 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 > >
Peter Alspach
2006-Mar-21 02:35 UTC
[R] Special characters: plus/minus - a method that works
Gabor Grothendieck wrote:> Another way that works on my Windows XP system is to use "\261" .Please note Windows escape codes are not portable thus not recommended as Martin Maechler pointed out in a response to a suggestion of mine: On Tue, 14 Jun 2005, Martin Maechler wrote:>>>>>> "Peter" == Peter Alspach <PAlspach at hortresearch.co.nz> >>>>>> on Tue, 14 Jun 2005 14:11:47 +1200 writes: > > Peter> Ben > > Peter> Others have pointed out plotmath. However, for some > Peter> superscripts (including 2) it may be easier to use > Peter> the appropriate escape sequence (at in Windows): > > Peter> ylab = 'BA (m\262/ha)' > > but please refrain from doing that way. > You should write R code that is portable, and ``plotmath'' > has been designed to be portable. Windows escape codes are not, > and may not even work in future (or current?) versions of > Windows with `unusual' locale settings {fonts, etc}.Peter Alspach ______________________________________________________ The contents of this e-mail are privileged and/or confidenti...{{dropped}}