[R] Use line break at scrip but avoid line break on graphics
Rolf Turner
rolf.turner at xtra.co.nz
Fri Jun 3 00:13:06 CEST 2011
On 03/06/11 09:03, Walmes Zeviani wrote:
> Hello list,
>
> I have plots with long strings in main=, ylab= or xlab=. So, in I my script
> I use break long lines to avoid lines hiden on my monitor and in sweave
> document pages. I use graphics like this
>
> plot(1, main="aaaaaaaaaaaaaaaaaaaa
> bbbbbbbbbbbbbbbbbbbb")
>
> but I would like a plot result like this
>
> plot(1, main="aaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbb")
>
> I remember once I saw a meta character like "\n" that avoid this breack line
>
> plot(1, main="aaaaaaaaaaaaaaaaaaaa\(?)
> bbbbbbbbbbbbbbbbbbbb")
>
> Does someone know that?
I think that
plot(1,main=paste("aaaaaaaaaaaaaaaaaaaa",
"bbbbbbbbbbbbbbbbbbbb"))
might do what you want.
cheers,
Rolf Turner
More information about the R-help
mailing list