Skip to content

ggplot2(0.9.0): could not find function "=="

4 messages · James, Hadley Wickham

#
Hi,

I have a question related to the newest version of ggplot2 (0.9.0).  I
just updated this morning and from CRAN it looks like the Mac version
is the only one at 0.9.0 as of right now.

http://cran.r-project.org/web/packages/ggplot2/index.html

Anyway, I was in the midst of a project where I was trying to
replicate "Back-to-back Bar Charts" in this blog post.

http://learnr.wordpress.com/2009/09/24/ggplot2-back-to-back-bar-charts/

My project and the example in the blog post no longer work with 0.9.0.
 I just want to figure out how to fix the blog example, and then make
the same changes to my own work.

So this is the output:
Attaching package: ?reshape?

The following object(s) are masked from ?package:plyr?:

    rename, round_any
+     "EXP"), aes(y = value, fill = BEC), stat = "identity") +
+     geom_bar(subset = .(variable == "IMP"),
+              aes(y = -value, fill = BEC), stat = "identity") +
+                  xlab("") + scale_y_continuous("Export  -  Import",
+                                                formatter = "comma")
Error in continuous_scale(c("y", "ymin", "ymax", "yend", "yintercept",  :
  unused argument(s) (formatter = "comma")
+     "EXP"), aes(y = value, fill = BEC), stat = "identity") +
+     geom_bar(subset = .(variable == "IMP"),
+              aes(y = -value, fill = BEC), stat = "identity") +
+                  xlab("") + scale_y_continuous("Export  -  Import")
Error in eval(expr, envir, enclos) : could not find function "=="

The problem appears to be with the subsetting.  Apparently something
has changed between the versions.  I've been trying to read about the
changes between versions but so far have found so smoking gun.  Any
thoughts or suggestions as to the problem would be appreciated.

Thanks,

James
#
Hi James,

There were a few problems with the 0.9.0 version, which is why it was
pulled from CRAN.  I'd recommend re-installing 0.8.9:
install.packages("ggplot2", type = "source")

Hadley
On Wed, Feb 1, 2012 at 2:10 PM, J Toll <jctoll at gmail.com> wrote:

  
    
#
On Wed, Feb 1, 2012 at 9:48 PM, Hadley Wickham <hadley at rice.edu> wrote:
Hadley,

Thanks for your reply.  I went ahead and re-installed the old version
as you recommended.

I'm curious if you have a guess whether the issue I was having is a
result of the "problems" with the 0.9.0 version or if they're due to
fundamental changes in ggplot2?

Thanks again for your help.

Best regards,

James
5 days later
#
It looks like a bug - I'll add it to the to do list.

Hadley