ProjectMOSAIC / mosaic

Project MOSAIC R package
http://mosaic-web.org/
93 stars 26 forks source link

ASH plot not working in mplot() #634

Closed mdbeckman closed 7 years ago

mdbeckman commented 7 years ago

mplot(Data) Choose a plot type.

1: 1-variable (histogram, density plot, etc.) 2: 2-variable (scatter, boxplot, etc.) 3: map

Selection: 1 Error: StatAsh was built with an incompatible version of ggproto. Please reinstall the package that provides this extension.

rpruim commented 7 years ago

I can't recreate. I've tried on my laptop and on our RStudio server. Are you running updated versions of all your packages?

image

nicholasjhorton commented 7 years ago

Same here: I can't replicate this.

Can you also please include the output of "sessionInfo()"?

Nick

mdbeckman commented 7 years ago

I tried updating both ggplot2 & mosaic before logging the issue, but I can’t say I’ve updated all my packages. I’ll try that when I get to the office tomorrow. I do apologize if the issue is just on my end

Here’s sessionInfo()

sessionInfo() R version 3.3.1 (2016-06-21) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: OS X 10.11.6 (El Capitan)

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] mosaic_0.14.4 Matrix_1.2-6 mosaicData_0.14.0 lattice_0.20-33 ggplot2_2.2.1 dplyr_0.5.0

loaded via a namespace (and not attached): [1] Rcpp_0.12.9 tidyr_0.6.1 assertthat_0.1 MASS_7.3-45 grid_3.3.1 R6_2.1.2
[7] plyr_1.8.4 gtable_0.2.0 DBI_0.4-1 magrittr_1.5 scales_0.4.1 lazyeval_0.2.0
[13] ggdendro_0.1-20 labeling_0.3 splines_3.3.1 tools_3.3.1 munsell_0.4.3 colorspace_1.2-6 [19] manipulate_1.0.1 knitr_1.15.1 gridExtra_2.2.1 tibble_1.2

-Matt

— Dr. Matthew Beckman Chair of Undergraduate Studies Department of Statistics | Penn State University 316A Thomas Building | (814) 863-1022

On Mar 7, 2017, at 5:43 PM, Nicholas Horton notifications@github.com wrote:

Same here: I can't replicate this.

Can you also please include the output of "sessionInfo()"?

Nick

On Mar 7, 2017, at 5:23 PM, Randall Pruim notifications@github.com wrote:

I can't recreate. I've tried on my laptop and on our RStudio server. Are you running updated versions of all your packages?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

Nicholas Horton Professor of Statistics Department of Mathematics and Statistics, Amherst College PO Box 5000, AC #2239 Amherst, MA 01002-5000

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ProjectMOSAIC/mosaic/issues/634#issuecomment-284884730, or mute the thread https://github.com/notifications/unsubscribe-auth/AMb5xZUOoZ5OG-cAhyepGscfoyOOtUriks5rjd15gaJpZM4MWF5N.

nicholasjhorton commented 7 years ago

My other suggestion would be to update R.

All the best,

Nick

On Mar 7, 2017, at 9:08 PM, Matt Beckman notifications@github.com wrote:

I tried updating both ggplot2 & mosaic before logging the issue, but I can’t say I’ve updated all my packages. I’ll try that when I get to the office tomorrow. I do apologize if the issue is just on my end

Here’s sessionInfo()

sessionInfo() R version 3.3.1 (2016-06-21) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: OS X 10.11.6 (El Capitan)

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] mosaic_0.14.4 Matrix_1.2-6 mosaicData_0.14.0 lattice_0.20-33 ggplot2_2.2.1 dplyr_0.5.0

loaded via a namespace (and not attached): [1] Rcpp_0.12.9 tidyr_0.6.1 assertthat_0.1 MASS_7.3-45 grid_3.3.1 R6_2.1.2 [7] plyr_1.8.4 gtable_0.2.0 DBI_0.4-1 magrittr_1.5 scales_0.4.1 lazyeval_0.2.0
[13] ggdendro_0.1-20 labeling_0.3 splines_3.3.1 tools_3.3.1 munsell_0.4.3 colorspace_1.2-6 [19] manipulate_1.0.1 knitr_1.15.1 gridExtra_2.2.1 tibble_1.2

-Matt

— Dr. Matthew Beckman Chair of Undergraduate Studies Department of Statistics | Penn State University 316A Thomas Building | (814) 863-1022

On Mar 7, 2017, at 5:43 PM, Nicholas Horton notifications@github.com wrote:

Same here: I can't replicate this.

Can you also please include the output of "sessionInfo()"?

Nick

On Mar 7, 2017, at 5:23 PM, Randall Pruim notifications@github.com wrote:

I can't recreate. I've tried on my laptop and on our RStudio server. Are you running updated versions of all your packages?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

Nicholas Horton Professor of Statistics Department of Mathematics and Statistics, Amherst College PO Box 5000, AC #2239 Amherst, MA 01002-5000

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ProjectMOSAIC/mosaic/issues/634#issuecomment-284884730, or mute the thread https://github.com/notifications/unsubscribe-auth/AMb5xZUOoZ5OG-cAhyepGscfoyOOtUriks5rjd15gaJpZM4MWF5N.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

mdbeckman commented 7 years ago

Thanks for looking in to this. I’ve just updated my R build then updated all installed packages using the RStudio interface. Still encountered the same error about “incompatible version of ggproto"

Thanks, Matt

mosaic::mplot(mtcars) Choose a plot type.

1: 1-variable (histogram, density plot, etc.) 2: 2-variable (scatter, boxplot, etc.) 3: map

Selection: 1 Error: StatAsh was built with an incompatible version of ggproto. Please reinstall the package that provides this extension.

sessionInfo() R version 3.3.3 (2017-03-06) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: OS X El Capitan 10.11.6

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] mosaic_0.14.4 Matrix_1.2-8 mosaicData_0.14.0 ggplot2_2.2.1 lattice_0.20-34 dplyr_0.5.0

loaded via a namespace (and not attached): [1] Rcpp_0.12.9 tidyr_0.6.1 assertthat_0.1 MASS_7.3-45 grid_3.3.3 R6_2.2.0 plyr_1.8.4 gtable_0.2.0 DBI_0.5-1 magrittr_1.5
[11] scales_0.4.1 lazyeval_0.2.0 ggdendro_0.1-20 labeling_0.3 splines_3.3.3 tools_3.3.3 munsell_0.4.3 colorspace_1.3-2 manipulate_1.0.1 gridExtra_2.2.1 [21] tibble_1.2

— Dr. Matthew Beckman Chair of Undergraduate Studies Department of Statistics | Penn State University 316A Thomas Building | (814) 863-1022

On Mar 7, 2017, at 9:44 PM, Nicholas Horton notifications@github.com wrote:

My other suggestion would be to update R.

All the best,

Nick

On Mar 7, 2017, at 9:08 PM, Matt Beckman notifications@github.com wrote:

I tried updating both ggplot2 & mosaic before logging the issue, but I can’t say I’ve updated all my packages. I’ll try that when I get to the office tomorrow. I do apologize if the issue is just on my end

Here’s sessionInfo()

sessionInfo() R version 3.3.1 (2016-06-21) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: OS X 10.11.6 (El Capitan)

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] mosaic_0.14.4 Matrix_1.2-6 mosaicData_0.14.0 lattice_0.20-33 ggplot2_2.2.1 dplyr_0.5.0

loaded via a namespace (and not attached): [1] Rcpp_0.12.9 tidyr_0.6.1 assertthat_0.1 MASS_7.3-45 grid_3.3.1 R6_2.1.2 [7] plyr_1.8.4 gtable_0.2.0 DBI_0.4-1 magrittr_1.5 scales_0.4.1 lazyeval_0.2.0 [13] ggdendro_0.1-20 labeling_0.3 splines_3.3.1 tools_3.3.1 munsell_0.4.3 colorspace_1.2-6 [19] manipulate_1.0.1 knitr_1.15.1 gridExtra_2.2.1 tibble_1.2

-Matt

— Dr. Matthew Beckman Chair of Undergraduate Studies Department of Statistics | Penn State University 316A Thomas Building | (814) 863-1022

On Mar 7, 2017, at 5:43 PM, Nicholas Horton notifications@github.com wrote:

Same here: I can't replicate this.

Can you also please include the output of "sessionInfo()"?

Nick

On Mar 7, 2017, at 5:23 PM, Randall Pruim notifications@github.com wrote:

I can't recreate. I've tried on my laptop and on our RStudio server. Are you running updated versions of all your packages?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

Nicholas Horton Professor of Statistics Department of Mathematics and Statistics, Amherst College PO Box 5000, AC #2239 Amherst, MA 01002-5000

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ProjectMOSAIC/mosaic/issues/634#issuecomment-284884730, or mute the thread https://github.com/notifications/unsubscribe-auth/AMb5xZUOoZ5OG-cAhyepGscfoyOOtUriks5rjd15gaJpZM4MWF5N.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ProjectMOSAIC/mosaic/issues/634#issuecomment-284929750, or mute the thread https://github.com/notifications/unsubscribe-auth/AMb5xRlfwRZnworB8kr98krVZxhF3G0lks5rjhYCgaJpZM4MWF5N.

nicholasjhorton commented 7 years ago

Can you try installing the development version of ggplot2 from github?

devtools::install_github("hadley/ggplot2")

http://stackoverflow.com/questions/40642850/ggmap-error-geomrasterann-was-built-with-an-incompatible-version-of-ggproto

mdbeckman commented 7 years ago

Hi Nick,

I installed the development version of ggplot2 as recommended, but still reached the same error.

So, you and Randy haven’t been able to replicate the error?

Other thoughts:

Could either of those be contributing factors? I know RStudio is required for the mplot() function (and isn’t reflected in sessionInfo(), so I wonder if that’s related?

Best, Matt

mosaic::mplot(mtcars) Choose a plot type.

1: 1-variable (histogram, density plot, etc.) 2: 2-variable (scatter, boxplot, etc.) 3: map

Selection: 1 Error: StatAsh was built with an incompatible version of ggproto. Please reinstall the package that provides this extension.

sessionInfo() R version 3.3.3 (2017-03-06) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: OS X El Capitan 10.11.6

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] mosaic_0.14.4 Matrix_1.2-8 mosaicData_0.14.0 ggplot2_2.2.1.9000 lattice_0.20-34 dplyr_0.5.0

loaded via a namespace (and not attached): [1] Rcpp_0.12.9 tidyr_0.6.1 assertthat_0.1 MASS_7.3-45 grid_3.3.3 R6_2.2.0 plyr_1.8.4 gtable_0.2.0 DBI_0.5-1 magrittr_1.5
[11] scales_0.4.1 lazyeval_0.2.0 ggdendro_0.1-20 labeling_0.3 splines_3.3.3 tools_3.3.3 munsell_0.4.3 colorspace_1.3-2 manipulate_1.0.1 gridExtra_2.2.1 [21] tibble_1.2

— Dr. Matthew Beckman Chair of Undergraduate Studies Department of Statistics | Penn State University 316A Thomas Building | (814) 863-1022

rpruim commented 7 years ago

I haven’t had time to dig deeper, but the error message indicates a problem with ggproto, the OO system used by ggplot2 to create Geoms and Stats (among other things). The ggplot2 versions of ash plots rely on a Geom built in the mosaic package. It sounds like something is out of sync due to a change in ggplot2/ggproto. I’ll have to see whether Hadely has perhaps changed something in the interface. But it seems odd that using updated packages on my end works without complaint. (I haven’t updated R to the newest version yet, but I’m not expecting that to be the source of the trouble.)

I’m assuming you will get the same error if you create an ash plot manually. Is that true? Can you run both of these commands and let me know what happens?

ggplot(HELPrct) + geom_ash(aes(x = age)) ggplot(HELPrct) + geom_histogram(aes(x = age))

—rjp

mdbeckman commented 7 years ago

Here are the results for those two commands. ASH plot returns same error, but the regular histogram worked ok

Thanks, Matt

ggplot(HELPrct) + geom_ash(aes(x = age)) Error: StatAsh was built with an incompatible version of ggproto. Please reinstall the package that provides this extension. ggplot(HELPrct) + geom_histogram(aes(x = age)) stat_bin() using bins = 30. Pick better value with binwidth.

rpruim commented 7 years ago

I should have asked this earlier: Did you install mosaic pre-built (ie, from binaries) from CRAN? If so, I think reinstalling with one of the following

install.packages("mosaic", type = "source")
devtools::install_github("ProjectMOSAIC/mosaic")

may fix the problem. It appears there was a bug in ggplot2 that affects extensions in other packages, so you need to force the package to be rebuilt. Note: re-using a binary that was built before the change to ggplot2 won't fix this issue.

Let me know if that works for you.

mdbeckman commented 7 years ago

That did the trick!

Thank you both for helping me sort this out, have a great weekend!

-Matt

— Dr. Matthew Beckman Chair of Undergraduate Studies Department of Statistics | Penn State University 316A Thomas Building | (814) 863-1022

On Mar 10, 2017, at 12:29 AM, Randall Pruim notifications@github.com wrote:

I should have asked this earlier: Did you install mosaic pre-built (ie, from binaries) from CRAN? If so, I think reinstalling with one of the following

install.packages("mosaic", type = "source") devtools::install_github("ProjectMOSAIC/mosaic") may fix the problem. It appears there was a bug in ggplot2 that affects extensions in other packages, so you need to force the package to be rebuilt. Note: re-using a binary that was built before the change to ggplot2 won't fix this issue.

Let me know if that works for you.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ProjectMOSAIC/mosaic/issues/634#issuecomment-285582036, or mute the thread https://github.com/notifications/unsubscribe-auth/AMb5xZSrJ6O4Z63Mhcl0e-9EQxCVD43-ks5rkN-jgaJpZM4MWF5N.

rpruim commented 7 years ago

Thanks for confirming. This should be resolved in the binary versions at our next CRAN release because then those binaries will be rebuilt. I'm hoping this will happen in the next 2 weeks.