Re: [R] Greek character and R
mytitle = parse(text=paste(expression(paste(delta^13,'C Station ',,i, title(mytitle) -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Filoche Sent: Thursday, March 03, 2011 8:16 AM To: r-help@r-project.org Subject: [R] Greek character and R 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? With regards, Phil -- View this message in context: http://r.789695.n4.nabble.com/Greek-character-and-R-tp304p304.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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. message may contain confidential information. If you are not the designated recipient, please notify the sender immediately, and delete the original and any copies. Any use of the message by you is prohibited. __ R-help@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.
Re: [R] Greek character and R
Hi and ty for the answer. However, it's not working. It will print expression(d13C Station 1). Thank for any help, Phil -- View this message in context: http://r.789695.n4.nabble.com/Greek-character-and-R-tp304p467.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.
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)) Duncan Murdoch __ R-help@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.
Re: [R] Greek character and R
Eval it. This works at my house: plot(0) title(eval(parse(text=paste(expression(paste(delta^13,'C Station ',,i,)) -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Filoche Sent: Thursday, March 03, 2011 9:39 AM To: r-help@r-project.org Subject: Re: [R] Greek character and R Hi and ty for the answer. However, it's not working. It will print expression(d13C Station 1). Thank for any help, Phil -- View this message in context: http://r.789695.n4.nabble.com/Greek-character-and-R-tp304p467.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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. message may contain confidential information. If you are not the designated recipient, please notify the sender immediately, and delete the original and any copies. Any use of the message by you is prohibited. __ R-help@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.
Re: [R] Greek character and R
Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Duncan Murdoch Sent: Thursday, March 03, 2011 7:30 AM To: Filoche Cc: r-help@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@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. __ R-help@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.
Re: [R] Greek character and R
or even without using 'paste' plot(1,1,main=bquote(delta^13~'C Station'~.(i))) Am 03.03.2011 16:45, schrieb William Dunlap: Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Duncan Murdoch Sent: Thursday, March 03, 2011 7:30 AM To: Filoche Cc: r-help@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@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. __ R-help@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. -- Eik Vettorazzi Department of Medical Biometry and Epidemiology University Medical Center Hamburg-Eppendorf Martinistr. 52 20246 Hamburg T ++49/40/7410-58243 F ++49/40/7410-57790 __ R-help@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.