I think you have older version of R (and subsequently installed older version of ggplot)?
Try to see what version you have, type:
sessionInfo()
I have R-2.15.3 and ggplot2_0.9.3.1; I don’t have any problem to run the code you posted below, but when I tested it with R-2.12.2 and ggplot2_0.8.9 then I got the same error as you have.
--Kaori
From: ggp...@googlegroups.com [mailto:ggp...@googlegroups.com]
On Behalf Of Genomics Epigenomics
Sent: Wednesday, May 01, 2013 10:03 AM
To: ggp...@googlegroups.com
Subject: Error: could not find function "theme"
After installing and loading ggplot2;
install.packages("ggplot2")
library(ggplot2)
I tried the following code,
> p <- qplot(mpg, wt, data = mtcars)
> p + theme(panel.background = element_rect(colour = "pink"))
and got an error: Error: could not find function "theme"
Any help please?
Thnx
Nano
--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example:
https://github.com/hadley/devtools/wiki/Reproducibility
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2
---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.