friendly / VCDR

Visualizing categorical data with R
0 stars 0 forks source link

ggplot2 1.1.0 compatibility testing #57

Open friendly opened 8 years ago

friendly commented 8 years ago

Hadley Wickham just announced a prerelease period for ggplot2 1.1.0, which introduces many changes, described in https://github.com/hadley/ggplot2/blob/master/NEWS.md

Because we use ggplot2 extensively, it would be good to test the book with the new version to make sure that nothing breaks, i.e., Error: does not appear in the text. I think the way to do this (and be able to revert to the current CRAN version is

devtools::dev_mode()
devtools::install_github("hadley/ggplot2")
knit2pdf("book.Rnw", quiet=TRUE)
...
devtools::dev_mode()
friendly commented 8 years ago

Ran that test. Found two errors, steming from use of family = binomial in stat_smooth(): E.g., this code for Example 1.3 gives Error: Unknown parameters: family

data("Donner", package="vcdExtra")
donner.mod <- glm(survived ~ age, data=Donner, family=binomial)
library(ggplot2)
ggplot(Donner, aes(age, survived)) + theme_bw() +
  geom_point(position = position_jitter(height = 0.02, width = 0)) +
    stat_smooth(method = "glm", family = binomial, formula = y ~ x,
              fill="blue", alpha = 0.3, size=2)
mattsigal commented 8 years ago

According to the NEWS (https://github.com/hadley/ggplot2/blob/master/NEWS), all it says is that "stat_smooth() checks for method = "auto" and method = "glm" in a safer way." - no mention of the removal of the family argument.

On Mon, Oct 19, 2015 at 8:15 AM, Michael Friendly notifications@github.com wrote:

Ran that test. Found two errors, steming from use of family = binomial in stat_smooth(): E.g., this code for Example 1.3 gives Error: Unknown parameters: family

data("Donner", package="vcdExtra") donner.mod <- glm(survived ~ age, data=Donner, family=binomial) library(ggplot2) ggplot(Donner, aes(age, survived)) + theme_bw() + geom_point(position = position_jitter(height = 0.02, width = 0)) + stat_smooth(method = "glm", family = binomial, formula = y ~ x, fill="blue", alpha = 0.3, size=2)

— Reply to this email directly or view it on GitHub https://github.com/friendly/VCDR/issues/57#issuecomment-149197703.

mattsigal commented 8 years ago

I should mention that that is from the stable branch; no mention of glm at all in the development branch NEWS.

On Mon, Oct 19, 2015 at 9:38 AM, Matthew Sigal matthewsigal@gmail.com wrote:

According to the NEWS (https://github.com/hadley/ggplot2/blob/master/NEWS), all it says is that "stat_smooth() checks for method = "auto" and method = "glm" in a safer way." - no mention of the removal of the family argument.

On Mon, Oct 19, 2015 at 8:15 AM, Michael Friendly < notifications@github.com> wrote:

Ran that test. Found two errors, steming from use of family = binomial in stat_smooth(): E.g., this code for Example 1.3 gives Error: Unknown parameters: family

data("Donner", package="vcdExtra") donner.mod <- glm(survived ~ age, data=Donner, family=binomial) library(ggplot2) ggplot(Donner, aes(age, survived)) + theme_bw() + geom_point(position = position_jitter(height = 0.02, width = 0)) + stat_smooth(method = "glm", family = binomial, formula = y ~ x, fill="blue", alpha = 0.3, size=2)

— Reply to this email directly or view it on GitHub https://github.com/friendly/VCDR/issues/57#issuecomment-149197703.