Skip to content

forcats

Tools for Working with Categorical Variables (Factors)

v1.0.1 · Sep 24, 2025 · MIT + file LICENSE

Description

Helpers for reordering factor levels (including moving specified levels to front, ordering by first appearance, reversing, and randomly shuffling), and tools for modifying factor levels (including collapsing rare levels into other, 'anonymising', and manually 'recoding').

Downloads

571.9K

Last 30 days

109th

1.9M

Last 90 days

8M

Last year

Trend: -8.9% (30d vs prior 30d)

CRAN Check Status

14 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Reverse Dependencies (360)

imports

BREADR BeeBDC BiostatsUHNplus CAST CMMs CimpleG CoNI CohortPlat ConfidenceEllipse DCPO DImodelsVis EDCimport ENMTools EpiForsk FARS FMAT FRI FinanceGraphs GRIN2 GimmeMyStats IRexamples MCOE MIC NMTox NeuroDecodeR OBL OlinkAnalyze OlympicRshiny OutliersO3 PEIMAN2 PERK PKbioanalysis PieGlyph RCT REDCapCAST REDCapDM REDCapTidieR ROCnGO RSDA RastaRocket Rbearcat SCoRES SEERaBomb SIAmodules SWTools SafeVote SeroTrackR ShapleyOutlier TheseusPlot Tplyr UCSCXenaShiny UpAndDownPlots WMAP activAnalyzer actuary adepro adestr adventr aihuman amp.dm aplotExtra apyramid autoslider.core bartXViz bibliometrix bonsaiforest brinton broom.mixed bupaR burnr calendR calendRio cats causact ccostr cheese chevron ci cicalc cisp climatehealth clustringr cocktailApp codebook correlationfunnel cpsvote crosstable dados datacult dataviewR datos describedata descstat dfoliatR dunlin eHDPrep easyRaschBayes easyalluvial echoice2 elaborator ensModelVis epe4md epikit episensr epitabulate epiviz evalITR explore ezplot fedmatch ffp finalfit flowmapper fluxible fonctionr forestecology framecleaner funneljoin gdverse gemtc ggVennDiagram ggblanket ggdag ggfacto ggplate ggquickeda ggsegmentedtotalbar ggseqplot ggstats ggsurveillance glmmfields globaltrends gtreg guideR haven healthyR.ai healthyR.ts hipecR iNZightTS iNZightTools ideanet injurytools interfacer iotables iraceplot janus jmastats kayadata labNorm lactater lmeresampler madshapR manydist markovmix matchmaker mbRes metabolic metaconfoundr migest mlfit modeltime mpwR multinma naniar nevada normfluodbf npcs nzilbb.vowels omicsTools palaeoSig parcats partition pepdiff phylepic plot3logit plotor plotthis pollster prcr processmapR processpredictR projoint protti psmineR r4ss raptools rjaf robustT2 sampbias sampcompR saros saros.base scCustomize scipub sense sfcr sherlock simaerep simlandr simplanonym simplecolors sitar smdi snap snpAIMeR statAfrikR steppedwedge stevemisc summarySCI survParamSim synthpop sysAgNPs tabxplor teal.modules.general tern testcorr tfrmt tidyAML tidycat tidycomm tidync tidyplots tidyrates tidysynth tidysynthesis tidytlg tidyverse tidywater timetk tsg twoxtwo umiAnalyzer unheadr unpivotr veesa visdat wcde weed wrappedtools xadmix xpose.xtras

Dependency Network

Dependencies Reverse dependencies cli glue lifecycle magrittr rlang tibble BREADR BeeBDC BiostatsUHNplus CAST CMMs CimpleG CoNI CohortPlat ConfidenceEllipse DCPO DImodelsVis EDCimport ENMTools EpiForsk FARS +345 more reverse deps forcats

Version History

new 1.0.1 Mar 10, 2026
updated 1.0.1 ← 1.0.0 diff Sep 24, 2025
updated 1.0.0 ← 0.5.2 diff Jan 28, 2023
updated 0.5.2 ← 0.5.1 diff Aug 19, 2022
updated 0.5.1 ← 0.5.0 diff Jan 26, 2021
updated 0.5.0 ← 0.4.0 diff Feb 29, 2020
updated 0.4.0 ← 0.3.0 diff Feb 16, 2019
updated 0.3.0 ← 0.2.0 diff Feb 18, 2018
updated 0.2.0 ← 0.1.1 diff Jan 22, 2017
updated 0.1.1 ← 0.1.0 diff Sep 15, 2016
new 0.1.0 Aug 28, 2016