earowang/tsibbletalk

plotly_key_tree fails

Closed this issue · 1 comments

Hi,

This issue is triggered by running the example code in the help page for plot_key_treee, and appears to be related to omitting the name of the 'direction' argument to vec_orders():

install.packages("tsibbletalk", dependencies =TRUE)
library(tsibbletalk)
shared_tourism <- as_shared_tsibble(tourism_monthly,

  •                                 spec = (State / Region) * Purpose)
    

plotly_key_tree(shared_tourism)
Error in vec_order():
! ... must be empty.
✖ Problematic argument:
• ..1 = "desc"
ℹ Did you forget to name an argument?
Run rlang::last_trace() to see where the error occurred.

rlang::last_trace()
<error/rlib_error_dots_nonempty>
Error in vec_order():
! ... must be empty.
✖ Problematic argument:
• ..1 = "desc"
ℹ Did you forget to name an argument?


Backtrace:

  1. └─tsibbletalk::plotly_key_tree(shared_tourism)
  2. └─tsibbletalk:::plot_dendro2(...)
  3. ├─vctrs::vec_slice(all_xy, vec_order(all_xy$y, "desc"))
    
  4. └─vctrs::vec_order(all_xy$y, "desc")
    

thanks. Fixed in PR #3 by @dicook