[R] variable values in plotmath expressions

2012-03-15 Thread Richard M. Heiberger
## I would like help in using variable values in plotmath expressions ## in lattice x - 1:10 y - 1:10 pval - .95 plot(y ~ x, ## works as I want in base graphics main=substitute(list(alpha * = * group(,list(p),)), list(p=pval))) plot(y ~ x, ## doesn't work as intended: pval is displayed

Re: [R] variable values in plotmath expressions

2012-03-15 Thread Joshua Wiley
Hi Rich, I'm not sure if you have a reason outside this toy example to want to be using list() and group(), but if not I would go with this: xyplot(y ~ x, main = substitute(expression(alpha == p), list(p = pval))) Hope this helps, Josh On Thu, Mar 15, 2012 at 7:25 PM, Richard M. Heiberger

Re: [R] variable values in plotmath expressions

2012-03-15 Thread Gabor Grothendieck
On Thu, Mar 15, 2012 at 10:25 PM, Richard M. Heiberger r...@temple.edu wrote: ## I would like help in using variable values in plotmath expressions ## in lattice x - 1:10 y - 1:10 pval - .95 plot(y ~ x, ## works as I want in base graphics     main=substitute(list(alpha * = *