Re: [R] titles with superscript and variale value

From: Monica Pisica <pisicandru_at_hotmail.com>
Date: Sun, 27 Jan 2008 23:42:11 +0000

Hi Henrique,  

Thanks a lot - this works like a charm ..... and actually i can have it in the plot command instead of writing a different line of command for tile ;-)  

Monica> Date: Sun, 27 Jan 2008 19:52:59 -0200> From: wwwhsd@gmail.com> To: pisicandru@hotmail.com> Subject: Re: [R] titles with superscript and variale value> CC: r-help@r-project.org> > Try this> > plot(rnorm(100), main=bquote(Family ~ Gaussian ~ ";" ~ D^2 == .(d2)))> > > On 27/01/2008, Monica Pisica <pisicandru@hotmail.com> wrote:> >> >> > Hi everyone,> >> >> > I am trying to write a title for a plot which has a superscript like D^2 and a value of a variable stored in that variable..... i am not sure if i am clear so i will try an example:> >> >> > Suppose i want my title to be like: Family: Gaussian; D^2 = 0.45> >> >> > where i have the value 0.45 stored in variable d2 (which comes from some previous calculations, and depending which actual variables i am plotting, this d2 can have different values), and i want D^2 to be D superscrip 2.> >> >> > I've tried the following command lines:> >> >> > > title(main = expression(paste( "Family: Gaussian; ", D^2, " = ", d2)))> >> >> > which gives me the right superscript but instead of the value stored in d2 i get actually "d2" .... or> >> >> > > title(main = paste("Family: Gaussian; ", expression(D^2), " = ",d2))> >> >> > which gives me the real value stored in d2 but no superscript for D .... it comes like D^2 instead.> >> >> > I've tried few other command lines more foolish than the ones above .... with no result. I will really appreciate if you have any suggestions to get this title right.> >> >> > Thanks,> >> >> > Monica> >> > _________________________________________________________________> > Climb to the top of the charts! Play the word scramble challenge with star power.> >> > n> > ______________________________________________> > 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.> >> > > -- > Henrique Dallazuanna> Curitiba-Paraná-Brasil> 25° 25' 40" S 49° 16' 22" O
_________________________________________________________________
Need to know the score, the latest news, or you need your Hotmail®-get your "fix".

        [[alternative HTML version deleted]]



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. Received on Sun 27 Jan 2008 - 23:46:40 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 28 Jan 2008 - 01:30:09 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive