[R] permil symbol linux

Gavin Simpson gavin.simpson at ucl.ac.uk
Wed Jul 6 14:31:21 CEST 2011


On Wed, 2011-07-06 at 12:24 +0200, mathew brown wrote:
> To all in R land,
> 
> Here is what I would like to do.
> x = c(1:10)
> y = c(1:10)
> plot(x,y)
> mtext(side=2, line=1.5, expression(""*delta*""^18*"O [permill]"), cex=1, adj=0.5)
> 
> That's it. Except I would like to replace "permill" with the symbol.
> Thanks for the help

Are you trying to be difficult? Have you read the posting guide so you
can provide the "at minimum" information Prof. Ripley asked you for?
Simply repeating the question ad nauseam isn't what was requested.

On my linux box, this will produce a d^{18}O permille **on screen** -
not sure why you want this in square brackets?

plot(1:10, ylab = expression(delta^{18}*O ~ ("\u2030")))

Now that glyph doesn't appear to be in the pdf device fonts for my
encoding so when plotting to pdf() I have to add
`encoding="WinAnsi.enc"` to my `pdf()` call - IIRC this advice at the
time was supplied by Prof. Ripley. The advice may well be different on
your **unstated** OS - hence the requests for more info.

This is with:

> sessionInfo()
R version 2.13.0 Patched (2011-04-19 r55527)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8    
 [5] LC_MONETARY=C              LC_MESSAGES=en_GB.UTF-8   
 [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods
base     

other attached packages:
[1] cocorresp_0.1-9 vegan_1.17-9

which would be part of the at minimum info Prof. Ripley asked for. And
also which device (windows(), x11(), quartz(), pdf(), postscript() etc,
etc.) do you *want* to print on?

Please do read the posting guide - you might not be aware what
information is required to answer your question, so what seems
superfluous may well be, and in this case probably is, *essential*.

G

> 
> On Wed, 6 Jul 2011 11:07:55 +0100 (BST)
> Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
> 
> > You still have not sent the information requested in the posting 
> > guide, and I do not know your target device nor locale, nor is that a 
> > reproducible example.
> > 
> > Please learn some respect for the time of the helpers here (and for 
> > all the work that went into making this possible in R).
> > 
> > On Wed, 6 Jul 2011, mathew brown wrote:
> > 
> > > Good point.
> > >
> > > Here is the code
> > > plot(dat$timestamp,dat$delta_18_16, ylab="", xlab="(min)", tck=0.05, col="blue")
> > > mtext(side=2, line=1.5, expression(""*delta*""^18*"O [\u0089]"), cex=1, adj=0.5)
> > >
> > > I'm still not sure how to get your code to work.
> > 
> > Unsurprising, as you have not seen *my* code.
> > 
> > > thanks
> > >
> > > On Wed, 6 Jul 2011 09:45:49 +0100 (BST)
> > > Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
> > >
> > >> On Wed, 6 Jul 2011, mathew brown wrote:
> > >>
> > >>> Hi,
> > >>
> > >>> I'm trying to figure out how to make a plot with ylab showing the
> > >>> permil symbol. Anyone know how to do this?
> > >>
> > >> Yes.
> > >>
> > >> Now, it you would follow the posting guide and give the 'at a minimum'
> > >> information you were asked for, and the graphics device you want to
> > >> use, we might be able to tell you more precisely how.
> > >>
> > >> Hint: that symbol is "\u0089", and also in latin-1.
> > >>
> > >>> Thanks
> > >>>
> > >>> --
> > >>>
> > >>> ______________________________________________
> > >>> R-help at r-project.org 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.
> > >>>
> > >>
> > >> --
> > >> Brian D. Ripley,                  ripley at stats.ox.ac.uk
> > >> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> > >> University of Oxford,             Tel:  +44 1865 272861 (self)
> > >> 1 South Parks Road,                     +44 1865 272866 (PA)
> > >> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
> > >
> > >
> > > --
> > > Mathew Brown
> > > Institute of Bioclimatology
> > > University of Göttingen
> > > Büsgenweg 2
> > > 37077 Göttingen, Germany
> > > t: +49 551 39 9359
> > > mathew.brown at forst.uni-goettingen.de
> > >
> > 
> > -- 
> > Brian D. Ripley,                  ripley at stats.ox.ac.uk
> > Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> > University of Oxford,             Tel:  +44 1865 272861 (self)
> > 1 South Parks Road,                     +44 1865 272866 (PA)
> > Oxford OX1 3TG, UK                Fax:  +44 1865 272595
> 
> 

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



More information about the R-help mailing list