[R] Greek character and R
William Dunlap
wdunlap at tibco.com
Thu Mar 3 16:45:51 CET 2011
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -----Original Message-----
> From: r-help-bounces at r-project.org
> [mailto:r-help-bounces at r-project.org] On Behalf Of Duncan Murdoch
> Sent: Thursday, March 03, 2011 7:30 AM
> To: Filoche
> Cc: r-help at r-project.org
> Subject: Re: [R] Greek character and R
>
> On 11-03-03 8:15 AM, Filoche wrote:
> > Dear R users.
> >
> > In a loop, I set the title of my graph with :
> >
> > mytitle = expression(paste(delta^13,'C Station ', i)
> > title(mytitle)
> >
> > However, instead of using value of i, it will literally use
> "i" character.
> >
> > Any one know the way to concatenate the value of i to the
> mathematical
> > expression?
> >
>
> Use
>
> mytitle <- substitute(paste(delta^13,'C Station ', ival),
list(ival=i))
Or use bquote():
mytitle <- bquote(paste(delta^13,'C Station ', .(i)))
Note that the original could not have worked since 'i' and 'delta'
appeared in the same manner and you only wanted i replaced by it
value.
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
>
> Duncan Murdoch
>
> ______________________________________________
> 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.
>
More information about the R-help
mailing list