[R] Use line break at scrip but avoid line break on graphics

David Winsemius dwinsemius at comcast.net
Fri Jun 3 00:30:09 CEST 2011


On Jun 2, 2011, at 6:13 PM, Rolf Turner wrote:

> 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"))

Look, Ma, no quotes!  Er, well, maybe one "quote".

plot(1, main=quote(aaaaaaaaaaaaaaaaaaaa~
                       bbbbbbbbbbbbbbbbbbbb) )

-- 

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list