gvelasq / tidytab

Create tidyverse-friendly tables of frequencies
https://gvelasq.github.io/tidytab/
Other
18 stars 6 forks source link

Replace `purrr::cross2()` with `tidyr::expand_grid()` #24

Open gvelasq opened 4 months ago

gvelasq commented 4 months ago
Warning (test-tab.R:60:3): tab1() and tab2() work
`cross2()` was deprecated in purrr 1.0.0.
i Please use `tidyr::expand_grid()` instead.
i See <https://github.com/tidyverse/purrr/issues/768>.

Related: https://github.com/tidyverse/purrr/issues/768

lhdjung commented 2 weeks ago

Hi, I saw that you currently use purrr::cross2() to create the tab_sequence object in tab2(). PR https://github.com/gvelasq/tidytab/pull/25/commits/26c090ad337d8d2e81225a26e23039fb42b0e709 replaces cross2() by tidyr::expand_grid(), but this new function currently returns its output in a different order than cross2().

If tab_sequence should retain its current order, there are a few options:

Also, the linked PR passes .filter = filter to tidyr::expand_grid(), but the function has no such parameter, so this won't work.