This morning I upgraded to R 3.2.3 (OSX 10.11.1). My ggplot2 scripts of the following form suddenly stopped working:
df <- data.frame(ind = c(20,35,45,55,70), dep = c(6,17,26,37,44))
syntax 1 :
ggplot()+ layer(data=df, mapping=aes(x=ind, y=dep), geom="point") "Error: Attempted to create layer with no stat."
ggplot2 itself is not broken, since
syntax 2:
ggplot(df, aes(x=ind, y=dep)) + geom_point()
creates the expected schedule. Syntax 1 still produces the expected schedule on the old machine (R 2.15.3 OSX 10.5.8). Also, I only used it this morning before the R update. I uninstalled and rebooted R3.2.3, ggplot2 and dependents, but the problem persists. I like Syntax 1 because I like adding layers from different datasets. I would be grateful for the thoughts.
r plot ggplot2 macos
Armand leroi
source share