library(ggplot2)
library(plyr)
library(reshape)
Attaching package: ?reshape?
The following object(s) are masked from ?package:plyr?:
? ?rename, round_any
trade <- read.csv("http://pastie.org/pastes/629247/download", header = TRUE, stringsAsFactors = FALSE)
balance <- ddply(trade, .(Time), summarise, balance = sum(EXP - IMP))
trade.m <- melt(trade, id.vars = c("BEC", "Time"))
ggplot(trade.m, aes(Time)) + geom_bar(subset = .(variable ==
+ ? ? "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")
ggplot(trade.m, aes(Time)) + geom_bar(subset = .(variable ==
+ ? ? "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