VasoGene
VasoGene

Reputation: 141

text paste in R

I am using the following command:

text(4.2,0.55, expression(paste(P[convs10*"%"*fat], "=0.221")), cex = 1.3)

How can I add a space between con vs 10% fat? At the moment all four words are without space.

Thanks

Upvotes: 1

Views: 521

Answers (1)

akrun
akrun

Reputation: 886938

We can use ~ to create the space

plot(1:100)
text(5.5, 1.2, expression(paste(P[con~vs~10*"%"~fat], "=0.221")), cex = 1.3)

enter image description here

Upvotes: 1

Related Questions