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@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.

Reply via email to