Skip to content

forcats (development version)

forcats 1.0.0

CRAN release: 2023-01-29

New features

Minor improvement and bug fixes

forcats 0.5.2

CRAN release: 2022-08-19

  • New fct() which works like factor() but errors if values of x are not included in the levels specification (#299)

  • first2() and last2() now ignore missing values in both x and y (#303).

  • Error messages are more informative.

forcats 0.5.1

CRAN release: 2021-01-27

forcats 0.5.0

CRAN release: 2020-03-01

forcats 0.4.0

CRAN release: 2019-02-17

New features

Minor bug fixes and improvements

forcats 0.3.0

CRAN release: 2018-02-19

API changes

  • 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() and fct_reorder2() have renamed fun to .fun to avoid spurious matching of named arguments.

New features

  • 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() gains w argument (#70, @wilkox) to weight value frequencies before lumping them together (#68).

Improvements to NA handling

Minor improvements and bug fixes

forcats 0.2.0

CRAN release: 2017-01-23

New functions

Minor improvements and bug fixes

  • fct_c() can take either a list of factors or individual factors (#42).

  • fct_drop() gains only argument to restrict which levels are dropped (#69) and no longer adds NA level if not present (#52).

  • fct_recode() is now checks that each new value is of length 1 (#56).

  • fct_relevel() gains after argument so you can also move levels to the end (or any other position you like) (#29).

  • lvls_reorder(), fct_inorder(), and fct_infreq() gain an ordered argument, allowing you to override the existing “ordered” status (#54).

forcats 0.1.1

CRAN release: 2016-09-16

  • Minor fixes for R CMD check

  • Add package docs