[R-SIG-Mac] problem with plot math

Roberta Rezende roberta.rezende at icloud.com
Wed Jan 29 11:39:49 CET 2014


Hi everyone,

I’m a newbie and I’m studying R.
I’m using Mavericks 10.9.1, R 3.0.2 with Rstudio.

I’ve tried this simple example:

x <- rnorm(100)
y <- x + rnorm(100, sd = 0.5)
plot(x, y,
     xlab=substitute(bar(x) == k, list(k=mean(x))),
     ylab=substitute(bar(y) == k, list(k=mean(y)))
)

but my plot only has the plot, with no labels at all.

If I try the follow example, it works

plot(0, 0, main = expression(theta == 0),
     ylab = expression(hat(gamma) == 0),
     xlab = expression(sum(x[i] * y[i], i==1, n)))

It is like it can’t do math, but it can plot values given.

May I have to install something else?

Thank you for your help


More information about the R-SIG-Mac mailing list