You're right. I was worried that c() would create a character vector and deparse the unevaluated call in the process, but apparently it is an implicit as.character _inside_ legend that is doing us in. (I can't offhand see where it is happening, but there might be scope for improvement if legend() would just accept a list object and treat the elements separately).
-pd > On 20 Oct 2019, at 20:28 , Bert Gunter <bgunter.4...@gmail.com> wrote: > > However, note that: > > > class(c("Sans renard", bquote(.(densren) (ind./km)^2))) > [1] "list" # by coercion > > so it does not seem necessary to explicitly call list(). That is: > > plot(1:100,1:100,type="n") > legend(list(x=0,y=100), legend = as.expression(c("Sans renard", > bquote(.(densren) (ind./km)^2))),lty=c(1,2),col=c("black","red"),bty="n") > > appears to suffice. I would appreciate correction if I'm wrong about this. > -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Office: A 4.23 Email: pd....@cbs.dk Priv: pda...@gmail.com ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.