[R] [Q] How to make a multi-line title with expression()

Augusto.Sanabria at ga.gov.au Augusto.Sanabria at ga.gov.au
Wed Mar 29 01:54:02 CEST 2006


Young-Jin,

The expression

tit1 <- "Max. Daily Wind Speed \nSydney Airport"

hist(ws,xlab='Wind Speed',ylab='Freq.",main=tit1)

works fine in my case. Try using your title between
one set of quotes. 

Hope it helps,

Augusto

--------------------------------------------
Augusto Sanabria. MSc, PhD.
Mathematical Modeller
Risk Research Group
Geospatial & Earth Monitoring Division
Geoscience Australia (www.ga.gov.au)
Cnr. Jerrabomberra Av. & Hindmarsh Dr.
Symonston ACT 2609
Ph. (02) 6249-9155
 
 


-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Sundar Dorai-Raj
Sent: Wednesday, 29 March 2006 9:29 AM
To: Young-Jin Lee
Cc: r-help
Subject: Re: [R] [Q] How to make a multi-line title with expression()




Young-Jin Lee wrote:
> Dear R-lister
> 
> Could anyone know how to make a multi-line title for a plot with 
> expression()? In my plot, the title should be writeen in two lines 
> (because it is two long for one line) and it should use a mathematical 
> expression. I tried to use "\n", but "\n" is ignored in expression() 
> call: hist(diffChangeRequestHintsBeforeAnswering[,4], br = 50, xlab = 
> "Skill Change in Standard Deviation", main = expression(paste("(a) 
> H&S", F[A], "\nRequest hint(s)/subtask(s) before first attempt")))
> 
> Thanks in advance.
> 
> Young-Jin Lee
> 

Try RSiteSearch("multi-line expression").

Thanks,

--sundar

______________________________________________
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.html




More information about the R-help mailing list