[R] Varying texts in expression(paste())

Morten Sickel Morten.Sickel at nrpa.no
Fri Jan 31 16:37:06 CET 2003


Gunter Bart wrote:
> You need substitute(). Look at the examples in plotmath().
> x<-3;y<-'foo'
> plot(c(0,1),c(0,1),type='n')
> text(.5,.5,substitute(paste('Releases of ',x^99,' ',y,'
> TBq/year'),list(x=x,y=y)))
> Hope this helps ...

Thanks a lot, it helped indeed!

Morten




More information about the R-help mailing list