Open dominikbach opened 10 months ago
When .x contains missing values, this throws an error if .f is a character vector but not if .f is a factor (with no missing values in either case).
.x
.f
This behaviour is not documented (and I suspect is not intended). It occurs in v0.5.0 and v1.0.0.
Example:
.f <- c("a", "b", "c") .x <- c(1, 2, NA) forcats::fct_reorder(.f, .x) forcats::fct_reorder(forcats::as_factor(.f), .x)
When
.x
contains missing values, this throws an error if.f
is a character vector but not if.f
is a factor (with no missing values in either case).This behaviour is not documented (and I suspect is not intended). It occurs in v0.5.0 and v1.0.0.
Example: