Re: [R] Italicized title from index

From: Jeremy Newman <jnewm101_at_uottawa.ca>
Date: Thu, 31 Mar 2011 11:58:41 -0400

Hi,

Thank you *very* much. I'll remember that in the future!

Cheers,

-Jeremy N

Undergraduate Researcher in Macroecology University of Ottawa
Department of Biology

Ad astra per alia porci!

On Thu, Mar 31, 2011 at 8:01 AM, Henrique Dallazuanna <wwwhsd_at_gmail.com>wrote:

> Better:
>
> plot(1, main = bquote("Yield for " ~ italic(.(as.character(spp))) ~
> "in management region" ~ .(region)))
>
> You have a factor, so you need convert it to character
>
>
> On Thu, Mar 31, 2011 at 8:59 AM, Henrique Dallazuanna <wwwhsd_at_gmail.com>
> wrote:
> > Try this:
> >
> > plot(1, main = bquote("Yield for " ~ italic(.(spp)) ~ "in management
> > region" ~ .(region)))
> >
> > On Thu, Mar 31, 2011 at 2:35 AM, Jeremy Newman <jnewm101_at_uottawa.ca>
> wrote:
> >> Hi all!
> >>
> >> I've written a handy script that uses a for loop to allow me to generate
> a
> >> large number of figures and statistical outputs for a large dataset.
> >>
> >> I am using indexing to retrieve a species name for the title of my
> graphs-
> >> which worked fine. However, I need to italicize these species names.
> >>
> >> I originally used the paste function, and had no problems with indexing:
> >>
> >> *main=paste("Yield for ", testsub[1,3], " in management region ",
> >> testsub[1,2])*
> >>
> >> The title looks like: "*Yield for Gadus morhua in management region
> 4X5Y*"
> >>
> >> I tried bquote from a related help thread, I tried to emulate it:
> >>
> >> *spp<-testsub[1,3]*
> >> *region<-testsub[1,2]*
> >> *
> >> *
> >> *main=bquote(Yield ~ for ~ italic(.(spp)) ~ in ~ management ~ region ~
> >> .(region))*
> >>
> >> Which doesn't seem to work at all, but when I try not putting anything
> after
> >> the italic:
> >>
> >> *main=bquote(Yield ~ for ~ italic(.(spp)))*
> >>
> >> I get: "*Yield for 1*"
> >> While *spp=Gadus morhua*
> >>
> >> I'm at wit's end, I tried to read about substitute, expression, and eval
> >> functions in the hopes I can figure it out, but I am lost!
> >>
> >> Thanks for any help!
> >>
> >> Cheers,
> >>
> >> -Jeremy N
> >>
> >> Undergraduate Researcher in Macroecology
> >> University of Ottawa
> >> Department of Biology
> >>
> >> Ad astra per alia porci!
> >>
> >> [[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.
> >>
> >
> >
> >
> > --
> > Henrique Dallazuanna
> > Curitiba-Paraná-Brasil
> > 25° 25' 40" S 49° 16' 22" O
> >
>
>
>
> --
> Henrique Dallazuanna
> Curitiba-Paraná-Brasil
> 25° 25' 40" S 49° 16' 22" O
>

        [[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 Thu 31 Mar 2011 - 16:07:10 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 Thu 31 Mar 2011 - 16:20:26 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