rstudio / ggvis

Interactive grammar of graphics for R
Other
715 stars 173 forks source link

ggvis erros from deprecated dplyr function #486

Closed lhocke closed 3 years ago

lhocke commented 4 years ago

Running into an odd issue attempting to use ggvis where data isn't actually being rendered. I went back to the most basic docs to check my work and even with a simple faithful %>% ggvis(~eruptions) >%> layer_histograms() I can get the plot but no actual layer of data.

I do get a couple warning messages though that may be relevant


1: `group_by_()` is deprecated as of dplyr 0.7.0.
Please use `group_by()` instead.
See vignette('programming') for more help
This warning is displayed once every 8 hours.
Call `lifecycle::last_warnings()` to see where this warning was generated. 
2: `mutate_()` is deprecated as of dplyr 0.7.0.
Please use `mutate()` instead.
See vignette('programming') for more help
This warning is displayed once every 8 hours.
Call `lifecycle::last_warnings()` to see where this warning was generated.
carmemias commented 4 years ago

Same problem here. This is the calls thread I get:

lifecycle::last_warnings()
[[1]]
<deprecated>
message: `group_by_()` is deprecated as of dplyr 0.7.0.
Please use `group_by()` instead.
See vignette('programming') for more help
This warning is displayed once every 8 hours.
Call `lifecycle::last_warnings()` to see where this warning was generated.
backtrace:
  1. (function (x, ...) ...
  2. ggvis:::print.ggvis(x)
  3. ggvis::view_static(x, ...)
  5. ggvis:::as.vega.ggvis(x, dynamic = FALSE)
  6. ggvis::layer_guess(x)
  7. ggvis:::f(vis, ...)
  8. ggvis::layer_f(...)
  9. ggvis:::fun(vis)
 11. ggvis:::compute_stack.ggvis(v, stack_var = ~count_, group_var = ~x_)
 12. ggvis:::register_computation(...)
 13. ggvis:::transform(parent_data(), args)
 18. ggvis:::compute_stack.data.frame(data, stack_var = ~count_, group_var = ~x_)
 19. dplyr::group_by_(x, group__ = gvar)
 20. dplyr:::lazy_deprec("group_by")

Warning seems to be triggered in ggvis:::compute_stack.data.frame(data, stack_var = ~count_, group_var = ~x_)

carmemias commented 4 years ago

In my case the ggvis graph got fixed after updating tibble to version 3.0.3, as indicated here: https://github.com/tidyverse/tibble/issues/798 It may help in your case as well @lhocke

The warnings were not related to the actual problem, afterall.

jtr13 commented 4 years ago

I updated tibble and still having problems with histograms. The sample code mtcars %>% ggvis(~mpg) %>% layer_histograms() produces a blank plot. image

lionel- commented 4 years ago

@jtr13 I think this will be fixed if you install dev ggvis from github.

jtr13 commented 3 years ago

Perfect, that worked, thanks!

carmemias commented 3 years ago

Sorry, I also had installed an older version of dplyr (0.5.0). That was probably what made the difference.

It's great to have a fix in github. Is there a date for when it may be pushed to CRAN? Thanks.

wch commented 3 years ago

Hi, we'll try to do a release in the next couple of weeks.

carmemias commented 3 years ago

That's brilliant, thanks!

wch commented 3 years ago

ggvis is on its way to CRAN now.