-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Feature Type
-
Adding new functionality to datar
-
Changing existing functionality in datar
-
Removing existing functionality in datar
Problem Description
Feature Description
-
New fct() which works like factor() but errors if values of x
are not included in the levels specification -
first2() and last2() now ignore missing values in both x and y
-
add
fct_na_value_to_level() -
fct_explicit_na()is deprecated in favour offct_na_value_to_level() -
fct_expand()gains anafterargument so that you can choose where
the new levels are placed -
fct_infreq()gains the ability to weight by another variable using thew
argument -
fct_inorder()now works when not all levels appear in the data -
fct_lump_prop()and friends now work correctly if you supply weights
and have empty levels -
fct_lump_n()and fct_lump_prop() will now create an "Other" level even
if it only consists of a single level. This makes them consistent with the
other fct_lump_* functions -
fct_other()no longer generates a warning if no levels are replaced with
other -
fct_relevel(),fct_cross(), andfct_expand()now error if you name the
arguments in**kwargssince those names are ignored and your code probably
doesn't do what you think it does (see alsofct_relevel()should gainfct_recode()functionality tidyverse/forcats#319). -
fct_reorder()andfct_reorder2()now remove NA values in_xwith a
warning. You can suppress the warning by setting_na_rm= True (see alsofct_reorder()yields unexpected result in presence of missing values tidyverse/forcats#315). -
fct_reorder()andfct_reorder2()gain a new_defaultargument that
controls the placement of empty levels (including levels that might become
empty after removing missing values in _x) (see alsofct_reorder()needsna_lastargument tidyverse/forcats#266). -
fct_unique()now captures implicit missing values if present
Additional Context
No response