Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

d3_nest() fails with dev tidyr #13

Closed
hadley opened this issue May 28, 2019 · 6 comments
Closed

d3_nest() fails with dev tidyr #13

hadley opened this issue May 28, 2019 · 6 comments

Comments

@hadley
Copy link

hadley commented May 28, 2019

library(d3r)

titanic_df <- Titanic %>% 
  data.frame() %>% 
  select(Class,Age,Survived,Sex,Freq)

d3_nest(titanic_df, value_cols="Freq", root="titanic")
#> Error: No tidyselect variables were registered

Would you mind taking a look? It's probably because I've accidentally broken some aspect of nest(), but I can't quite figure out what the code is supposed to be doing

@timelyportfolio
Copy link
Owner

@hadley I fixed with 4b276b3. I assume I will wait for newest tidyr to hit CRAN and then submit this new version of d3r to CRAN.

@hadley
Copy link
Author

hadley commented May 31, 2019

What was the root cause of the problem?

@timelyportfolio
Copy link
Owner

I ended up rewriting to work with new version, but I believe I could have fixed by changing the named argument data = to .data =.

@jennybc
Copy link
Contributor

jennybc commented Aug 2, 2019

d3r section of tidyr revdep check:

https://github.com/tidyverse/tidyr/blob/master/revdep/problems.md#d3r

Even when I check against the dev version of d3r, I see a problem. That is, 4b276b3 does not seem to actually resolve things. I still see this:

══ testthat results  ═══════════════════════════════════════════════════════
[ OK: 14 | SKIPPED: 4 | WARNINGS: 0 | FAILED: 2 ]
1. Error: d3_nest works as json (@test_hier.R#17) 
2. Error: d3_nest works with multiple NA levels (@test_hier.R#69) 

I've made another PR that does. Good news: small change! Bad news: requires dev tidyr. I lay out the options for next steps in the PR.

@jennybc
Copy link
Contributor

jennybc commented Aug 2, 2019

@timelyportfolio
Copy link
Owner

@hadley @jennybc this should now be fixed to work with both old and new tidyr syntax and has been released on CRAN. Thanks for all your help.

I know sunburstR is definitely solved with this change and fairly confident echarts4r will be fixed as well.

Please reopen if not solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants