Re: [R] substitute/paste question for using Greek in plot titles

2004-11-10 Thread Roger D. Peng
This is not a bug. The object passed to `main' should be either character or an expression (documented in ?title). substitute() returns neither a character object nor an expression -- it return a call object. This is documented in ?substitute: Substituting and quoting often causes confu

Re: [R] substitute/paste question for using Greek in plot titles

2004-11-10 Thread Sundar Dorai-Raj
Peter Dunn wrote: Hi all I am having troubles making sense of why code (1) below fails but code (2) below works. Code (1): > phi.1 <- 1 > plot(0 ~ 0, + main=substitute(paste("A vaue for ",phi," = ",phival), list(phival=phi.1)) ) Error in paste("The two deviances for ", phi, " = ", 2) :

[R] substitute/paste question for using Greek in plot titles

2004-11-10 Thread Peter Dunn
Hi all I am having troubles making sense of why code (1) below fails but code (2) below works. Code (1): > phi.1 <- 1 > plot(0 ~ 0, + main=substitute(paste("A vaue for ",phi," = ",phival), list(phival=phi.1)) ) Error in paste("The two deviances for ", phi, " = ", 2) : Object "phi" not fou