[R] Plot math symbol with string and number

John Smith j@whct @end|ng |rom gm@||@com
Mon Aug 17 16:23:58 CEST 2020


Thanks to Dunkan, Rasmus and Bert. Will keep the very useful tips. Best!

On Sun, Aug 16, 2020 at 9:13 PM Rasmus Liland <jral using posteo.no> wrote:

> On Sun, Aug 16, 2020 at 3:18 PM Bert wrote:
> | On Sun, Aug 16, 2020, 14:53 John wrote:
> | |
> | | I would like to make plots with
> | | titles for different data sets and
> | | different parameters. The first
> | | title doesn't show sigma as a math
> | | symbol, while the second one
> | | doesn't contain the s value as a
> | | numeric value
> | |
> | | s <- 1
> | | y <- rnorm(100)
> | | plot(y, main=paste("data", "sigma=", s))
> | | plot(y, main=expression(paste("data", sigma,"=", s)))
> |
> | ?plotmath
>
> Dear John, read ?plotmath, it is good, I
> was not aware of its existence; then
> backquote s like so:
>
>         plot(y, main=bquote(paste(
>           "data" ~~ widehat(aleph)
>           %notin% .(s)^.(s))))
>
> V
>
> r
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list