Reputation: 7517
I was wondering how I could make the letter "sigma" appear in Greek with the subscript "m" in the text() part of the R code below?:
curve(dnorm(x,175.3,.961),160,190,type="l")
sigmam <- dnorm(177.4,175.3,.961)/ dnorm(177.4,176,4)
text(165,.285,paste("sigmam", "=", round(1/sigmam,digits=2)))
Upvotes: 5
Views: 4919
Reputation: 93803
Check out ?plotmath
for relevant examples of how to piece this sort of thing together. For instance, here's one adapted from the "## How to combine "math" and numeric variables :"
curve(dnorm(x,175.3,.961),160,190,type="l")
sigmam <- dnorm(177.4,175.3,.961)/ dnorm(177.4,176,4)
text(165,.285, bquote(Sigma[m] == .(round(sigmam,2))))
Upvotes: 9