[R] linebreak in mathematical anotation?

Rainer M Krug r.m.krug at gmail.com
Mon Sep 1 17:29:07 CEST 2008


On Mon, Sep 1, 2008 at 5:26 PM, Rainer M Krug <r.m.krug at gmail.com> wrote:
> On Mon, Sep 1, 2008 at 5:22 PM, Henrique Dallazuanna <wwwhsd at gmail.com> wrote:
>> If I understand:
>>
>> tt <- c(expression(italic('First\nset')), expression(italic('Second\nset')),
>> expression(italic('third\nset')))
>> barplot(1:3, names.arg=tt)
>
> Thanks a lot - that is exactly what I was looking for

Just one additional query: is it possible to have the italics centered
(like in the non-italic example)?



>
> Rainer
>
>>
>> On Mon, Sep 1, 2008 at 12:17 PM, Rainer M Krug <r.m.krug at gmail.com> wrote:
>>>
>>> Hi
>>>
>>> I am using mathematical anotation to make the labels in a barplot in
>>> italics. as an example (adapted from
>>> http://finzi.psych.upenn.edu/R/Rhelp02a/archive/129808.html):
>>>
>>> tt <- c("italic(First~~set)", "italic(Second~~set)", "italic(third~~set")
>>> barplot(1:3, names.arg=parse(text=tt))
>>>
>>> But I would like to have it with "set" in a second column, like
>>>
>>> tt <- c("First\nset", "Second\nset", "third\nset")
>>> barplot(1:3, names.arg=tt)
>>>
>>> only in italics. Is this possible?
>>>
>>> Thanks
>>>
>>> Rainer
>>>
>>> --
>>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
>>> Biology, UCT), Dipl. Phys. (Germany)
>>>
>>> Centre of Excellence for Invasion Biology
>>> Faculty of Science
>>> Natural Sciences Building
>>> Private Bag X1
>>> University of Stellenbosch
>>> Matieland 7602
>>> South Africa
>>>
>>> ______________________________________________
>>> 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.
>>
>>
>>
>> --
>> Henrique Dallazuanna
>> Curitiba-Paraná-Brasil
>> 25° 25' 40" S 49° 16' 22" O
>>
>
>
>
> --
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
> Biology, UCT), Dipl. Phys. (Germany)
>
> Centre of Excellence for Invasion Biology
> Faculty of Science
> Natural Sciences Building
> Private Bag X1
> University of Stellenbosch
> Matieland 7602
> South Africa
>



-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Faculty of Science
Natural Sciences Building
Private Bag X1
University of Stellenbosch
Matieland 7602
South Africa



More information about the R-help mailing list