You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But there's a new bug if you mix NULL with other variables:
df<-dplyr::arrange(mtcars, NULL, am)
#> Error: `direction` should have length 1 or length equal to the number of columns of `x` when `x` is a data frame.
A correct solution should handle both of these cases:
df<-dplyr::arrange(mtcars, NULL, am)
#> Error: `direction` should have length 1 or length equal to the number of columns of `x` when `x` is a data frame.x<-NULLdf<-dplyr::arrange(mtcars, x, am)
#> Error: `direction` should have length 1 or length equal to the number of columns of `x` when `x` is a data frame.
Activity
hadley commentedon Jul 21, 2022
Looks like this has been fixed:
Created on 2022-07-21 by the reprex package (v2.0.1)
But there's a new bug if you mix
NULLwith other variables:Created on 2022-07-21 by the reprex package (v2.0.1)
DavisVaughan commentedon Jul 21, 2022
A correct solution should handle both of these cases:
Ignore NULLs in arrange()
Ignore NULLs in arrange() (#6372)