Skip to content

forcats

1.0.1

Tools for Working with Categorical Variables (Factors)

376packages depend
7.4Mdownloads / year
99.6%test coverage
13/13checks pass

Overview

About
Maintained by Hadley WickhamFirst published 2016-08-2910 releasesCRAN page ↗GitHub ↗

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').

Install

Health

CRAN checks
13OK
Slowest check: 1.8 min · r-oldrel-windows-x86_64
Code health
Yes
Tests · ratio 0.69
99.6%
Coverage · measured lines
97%
Documentation · exports
6
Dependencies · direct
Check history
  • OK2026-08-05
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-08-01
    12 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • OK2026-03-10
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMEYes · 301 wordsVignettesYes · dynamicpkgdown siteNoNEWSYes · 100% structuredCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
97%
Return-value docs
19%
References docs
0%

Downloads

7.4M
CRAN downloads in the past year
Rank #142 · ~20.3K/day · ~618.7K/mo
Daily download trend is not available in this view yet.
357.2K30 days
1.2M90 days
7.4M1 year
Compare downloads with other packages →
Also on76.9K r2u148 autocran975.8K conda_forge15.9K c2d4u

Repository

Repository
558Stars
135Forks
21Open issues
6Open PRs
10Releases
383Commits
59Contributors
rfactortidyverse
383 commits · Last activity 2026-02-02 · -0.2% stars, 30d

Stars over time

2025-06-01 · 5482026-07-28 · 558

Repository practices

Upstream repositoryBeta

13 development-tooling and community-health practices detected across 7 families in the upstream repository

Checks run against github.com/tidyverse/forcats on 2026-08-16.

Continuous integration (1)
GitHub Actions
Reproducibility and dev environment (1)
data-raw/
CRAN release process (2)
cran-comments.mdrevdep/
Docs source (1)
README.Rmd
Show all practices
Lint, format, editor (3)
AirVS CodeRStudio project
Coverage (2)
Codecov.covrignore
Governance and community (3)
Issue templatesCODEOWNERSSupport guide
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
14 external dependencies (excludes base and recommended)
Depends (1)
R >= 4.1
LinkingTo (0)
none
Enhances (0)
none

Code & Tests

Datasets

People & History

People (2)
Maintainer (1)
Author, Maintainer
Authors (1)
Author, Maintainer
Copyright holders (1)
Copyright holder, Funder · added in 1.0.1
Funders (1)
Copyright holder, Funder · added in 1.0.1
Listed in earlier versions (1)
no longer listed · 0.1.0 to 1.0.0
Package Timeline

10 releases. Pick two to compare their code metrics. R releases are shown for context.

  • R
    R 4.6.0 released · 2026-04-24
  • 1.0.1Latest
    2025-09-25 · current release · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • 1.0.0
    2023-01-29 · diff ↗
  • 0.5.2
    2022-08-20 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • 0.5.1
    2021-01-27 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • 0.5.0
    2020-03-01 · diff ↗
  • R
    R 3.6.0 released · 2019-04-26
  • 0.4.0
    2019-02-17 · diff ↗
  • R
    R 3.5.0 released · 2018-04-23
  • 0.3.0
    2018-02-19 · diff ↗
Show 5 earlier events
  • R
    R 3.4.0 released · 2017-04-21
  • 0.2.0
    2017-01-23 · diff ↗
  • 0.1.1
    2016-09-16 · diff ↗
  • 0.1.0
    2016-08-29
  • R
    R 3.3.0 released · 2016-05-03

Package metadata

First published
2016-08-29
Total releases
10 / 10 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 4.1
Bundled data
72 KB / 1 file
Download size
288 KB
Installed size
not tracked yet
With dependencies
not tracked yet

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("forcats")
Wickham, H., & Posit Software, PBC. (2025). forcats: Tools for Working with Categorical Variables (Factors) (Version 1.0.1) [Computer software]. https://doi.org/10.32614/CRAN.package.forcats

This is what citation() produces when a package has no citation file of its own. If it prints something else, use that.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for forcats version 1.0.1 [Data set]. HJJB, LLC. Data release v2026-08-17. https://doi.org/10.5281/zenodo.21843040

From data release v2026-08-17, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy