[R] Putting obejct into Graph title

Andrea Peters Peters.Andrea at imbe.imed.uni-erlangen.de
Tue May 7 18:01:12 CEST 2002


> If I want to put mean value of a matrix into the title or subtitle of a graph, how would I do this? For example, in a set of commands like below,
>
> > m.mean<-mean(m)
> > gplot (m, thresh=m.mean)
> > title (main="A2. Block Density of Matrix m\nplotted based on MDS",
> +    sub="lines below mean density (**0.435**) suppressed")
>
To get the whole expression into the subtitle you could use paste().


title (main="A2. Block Density of Matrix m\nplotted based on MDS",
  sub=paste("lines below mean density", m.mean, "suppressed"))

Andrea
>  I want to ask [R] to put the mean value (whatever it is, calulated as m.mean) into subtitle automatically, instead of my writing **0.435**.
>
> Is it possible?
>
> Thanks!
>
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list