I have been struggling with this problem for a while and I hope someone could help me. Or if someone could point me to a section in the manual I would be grateful. x <- "my" plot(1:10, main=expression(paste( x, Delta, "values" ))) Q : How do I get the title to say "my (triangle symbol) values" ? The following trial-and-error produced mainly errors : plot(1:10, main=expression(paste( get(x), Delta, "values" ))) plot(1:10, main=expression(paste( substitute(x), Delta, values ))) plot(1:10, main=expression(paste( deparse(x), Delta, "values" ))) plot(1:10, main=paste(x, expression(Delta), "values")) plot(1:10, main=paste(x, eval(expression(Delta)), "values")) plot(1:10, main=paste(x, expression(Delta, "values" ))) plot(1:10, main=paste(x, expression(paste(Delta, "values" )))) Many thanks. Regards, -- Adaikalavan Ramasamy ramasamy at cancer.org.uk Centre for Statistics in Medicine http://www.ihs.ox.ac.uk/csm/ Cancer Research UK Tel : 01865 226 677 Old Road Campus, Headington, Oxford Fax : 01865 226 962
Hi! plot(1:10, main=expression(paste( x," ", Delta, " values" ))) /E *********** REPLY SEPARATOR *********** On 9/6/2004 at 3:50 PM Adaikalavan Ramasamy wrote:>>>I have been struggling with this problem for a while and I hope >>>someone >>>could help me. Or if someone could point me to a section in the manual I >>>would be grateful. >>> >>> x <- "my" >>> plot(1:10, main=expression(paste( x, Delta, "values" ))) >>> >>>Q : How do I get the title to say "my (triangle symbol) values" ? >>> >>> >>>The following trial-and-error produced mainly errors : >>> >>> plot(1:10, main=expression(paste( get(x), Delta, "values" ))) >>> plot(1:10, main=expression(paste( substitute(x), Delta, values ))) >>> plot(1:10, main=expression(paste( deparse(x), Delta, "values" ))) >>> plot(1:10, main=paste(x, expression(Delta), "values")) >>> plot(1:10, main=paste(x, eval(expression(Delta)), "values")) >>> plot(1:10, main=paste(x, expression(Delta, "values" ))) >>> plot(1:10, main=paste(x, expression(paste(Delta, "values" )))) >>> >>>Many thanks. >>> >>>Regards, >>>-- >>>Adaikalavan Ramasamy ramasamy at cancer.org.uk >>>Centre for Statistics in Medicine http://www.ihs.ox.ac.uk/csm/ >>>Cancer Research UK Tel : 01865 226 677 >>>Old Road Campus, Headington, Oxford Fax : 01865 226 962 >>> >>>______________________________________________ >>>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.htmlDipl. bio-chem. Witold Eryk Wolski @ MPI-Moleculare Genetic Ihnestrasse 63-73 14195 Berlin 'v' tel: 0049-30-83875219 / \ mail: witek96 at users.sourceforge.net ---W-W---- http://www.molgen.mpg.de/~wolski wolski at molgen.mpg.de
Hi! Sorry for the previous mail. Take a look at parse. ?parse x<-"my" plot(1:10, main=parse(text=x)) Eryk. *********** REPLY SEPARATOR *********** On 9/6/2004 at 3:50 PM Adaikalavan Ramasamy wrote:>>>I have been struggling with this problem for a while and I hope >>>someone >>>could help me. Or if someone could point me to a section in the manual I >>>would be grateful. >>> >>> x <- "my" >>> plot(1:10, main=expression(paste( x, Delta, "values" ))) >>> >>>Q : How do I get the title to say "my (triangle symbol) values" ? >>> >>> >>>The following trial-and-error produced mainly errors : >>> >>> plot(1:10, main=expression(paste( get(x), Delta, "values" ))) >>> plot(1:10, main=expression(paste( substitute(x), Delta, values ))) >>> plot(1:10, main=expression(paste( deparse(x), Delta, "values" ))) >>> plot(1:10, main=paste(x, expression(Delta), "values")) >>> plot(1:10, main=paste(x, eval(expression(Delta)), "values")) >>> plot(1:10, main=paste(x, expression(Delta, "values" ))) >>> plot(1:10, main=paste(x, expression(paste(Delta, "values" )))) >>> >>>Many thanks. >>> >>>Regards, >>>-- >>>Adaikalavan Ramasamy ramasamy at cancer.org.uk >>>Centre for Statistics in Medicine http://www.ihs.ox.ac.uk/csm/ >>>Cancer Research UK Tel : 01865 226 677 >>>Old Road Campus, Headington, Oxford Fax : 01865 226 962 >>> >>>______________________________________________ >>>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.htmlDipl. bio-chem. Witold Eryk Wolski @ MPI-Moleculare Genetic Ihnestrasse 63-73 14195 Berlin 'v' tel: 0049-30-83875219 / \ mail: witek96 at users.sourceforge.net ---W-W---- http://www.molgen.mpg.de/~wolski wolski at molgen.mpg.de
Adaikalavan Ramasamy wrote: > I have been struggling with this problem for a while and I hope someone > could help me. Or if someone could point me to a section in the manual I > would be grateful. > > x <- "my" > plot(1:10, main=expression(paste( x, Delta, "values" ))) Yes, "substitution" is the correct keyword. Try the following: x <- "my" plot(1:10, main=substitute(x ~ Delta ~ "values", list(x=x))) BTW: similar problems were explained last week. Thomas P.
Adaikalavan Ramasamy wrote:> I have been struggling with this problem for a while and I hope someone > could help me. Or if someone could point me to a section in the manual I > would be grateful. > > x <- "my" > plot(1:10, main=expression(paste( x, Delta, "values" ))) > > Q : How do I get the title to say "my (triangle symbol) values" ?plot(1:10, main = substitute(y * " " * Delta * " values", list(y = x))) Uwe Ligges> > The following trial-and-error produced mainly errors : > > plot(1:10, main=expression(paste( get(x), Delta, "values" ))) > plot(1:10, main=expression(paste( substitute(x), Delta, values ))) > plot(1:10, main=expression(paste( deparse(x), Delta, "values" ))) > plot(1:10, main=paste(x, expression(Delta), "values")) > plot(1:10, main=paste(x, eval(expression(Delta)), "values")) > plot(1:10, main=paste(x, expression(Delta, "values" ))) > plot(1:10, main=paste(x, expression(paste(Delta, "values" )))) > > Many thanks. > > Regards,