Hello,

I seem unable to construct a legend which contains a substitution as
well as math symbols. I'm trying to do the following:

strain2 <- "YJG48"

legend.txt <- c(
        substitute(
                strain *
                %==% *
                "YJG45, rpn10" *
                %Delta%,
                list(strain=strain2)
        ),
        "Verhulst/Logistic",
        "Malthus"
)
legend(
        100,2.5,
        legend.txt,
        cex=0.75,
        bty="n",
        pch=c(20,NA,NA),
        lty=c(NA,1,2)

I derived this from the following "text" command which works, 

text(
        160,2.2,
        cex=0.5,
        adj=0,
        substitute(
                OD[600][~nm] * 
                " of 2 at " *
                time2_2 *
                " min" 
                %~~% 
                time2h_2 * 
                " h",
                list(
                        time2_2=round(time2_2,digits=0),
                        time2h_2=round(time2_2/60,digits=1)
                )
        )
)

But I can't get it to work in the context of "legend".
Any hints/ideas?

Thanks, Joh

______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to