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
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 of fct_na_value_to_level()
fct_expand() gains an after argument so that you can choose where
the new levels are placed
fct_infreq() gains the ability to weight by another variable using the w
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_reorder() and fct_reorder2() gain a new _default argument that
controls the placement of empty levels (including levels that might become
empty after removing missing values in _x) (see also fct_reorder() needs na_last argument tidyverse/forcats#266).
fct_unique() now captures implicit missing values if present
Additional Context
No response
The text was updated successfully, but these errors were encountered:
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 anafter
argument so that you can choose wherethe 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 datafct_lump_prop()
and friends now work correctly if you supply weightsand have empty levels
fct_lump_n()
and fct_lump_prop() will now create an "Other" level evenif 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 withother
fct_relevel()
,fct_cross()
, andfct_expand()
now error if you name thearguments in
**kwargs
since those names are ignored and your code probablydoesn't do what you think it does (see also
fct_relevel()
should gainfct_recode()
functionality tidyverse/forcats#319).fct_reorder()
andfct_reorder2()
now remove NA values in_x
with awarning. 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_default
argument thatcontrols the placement of empty levels (including levels that might become
empty after removing missing values in _x) (see also
fct_reorder()
needsna_last
argument tidyverse/forcats#266).fct_unique()
now captures implicit missing values if presentAdditional Context
No response
The text was updated successfully, but these errors were encountered: