-
fct_relabel()
now accepts character input. -
fct_collapse()
gains agroup_other
argument to allow you to group all un-named levels into"Other"
. (#100, @AmeliaMN) -
fct_cross()
creates a new factor containing the combined levels from two or more input factors, similar tobase::interaction
(@tslumley, #136) -
fct_count()
gains a parameter to compute the fraction of marginal table (@zhiiiyang, #146).
-
fct_c()
now requires explicit splicing with!!!
if you have a list of factors that you want to combine. This is consistent with an emerging standards for handling...
throughout the tidyverse. -
fct_reorder()
andfct_reorder2()
have renamedfun
to.fun
to avoid spurious matching of named arguments.
-
All functions that take
...
use "tidy" dots: this means that you use can!!!
to splice in a list of values, and trailing empty arguments are automatically removed. Additionally, all other arguments gain a.
prefix in order to avoid unhelpful matching of named arguments (#110). -
fct_lump()
gainsw
argument (#70, @wilkox) to weight value frequencies before lumping them together (#68).
-
as_factor()
andfct_inorder()
accept NA levels (#98). -
fct_explicit_na()
also replaces NAs encoded in levels. -
fct_lump()
correctly acccounts forNA
values in input (#41) -
lvls_revalue()
preserves NA levels.
-
Test coverage increased from 80% to 99%.
-
fct_drop()
now preserves attributes (#83). -
fct_expand()
andlvls_expand()
now also take character vectors (#99). -
fct_relabel()
now accepts objects coercible to functions byrlang::as_function
(#91, @alistaire47)
-
as_factor()
which works likeas.factor()
but orders levels by appearance to avoid differences between locales (#39). -
fct_other()
makes it easier to convert selected levels to "other" (#40) -
fct_relabel()
allows programmatic relabeling of levels (#50, @krlmlr).
-
fct_c()
can take either a list of factors or individual factors (#42). -
fct_drop()
gainsonly
argument to restrict which levels are dropped (#69) and no longer addsNA
level if not present (#52). -
fct_recode()
is now checks that each new value is of length 1 (#56). -
fct_relevel()
gainsafter
argument so you can also move levels to the end (or any other position you like) (#29). -
lvls_reorder()
,fct_inorder()
, andfct_infreq()
gain anordered
argument, allowing you to override the existing "ordered" status (#54).
-
Minor fixes for R CMD check
-
Add package docs