forcats
1.0.1Tools for Working with Categorical Variables (Factors)
Overview
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
- OK2026-03-1014 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
Documentation
- Examples that run
- 100%
- Documented parameters
- 97%
- Return-value docs
- 19%
- References docs
- 0%
Downloads
Repository
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Repository practices
13 development-tooling and community-health practices detected across 7 families in the upstream repository
Checks run against github.com/tidyverse/forcats on 2026-07-19.
Show all practices
Dependencies
and 325 more packages.
Code & Tests
- Cyclomatic complexity
- 2.0 median / 23 max
- Test cases
- 149 / 0.69 per code line
Test coverage
Line coverage
100%
Expression
99.5%
Tests / Examples
99.6% / 74% ex
Functions
112 38 exported
Complexity
2.7 avg / 23 max
Call network
112 nodes / 163 edges
Call graph
Open call graph →Lowest coverage
112 functions| Function | Cyclo | Coverage |
|---|---|---|
| as_factor.numeric | 1 | 0% |
| lump_cutoff | 3 | 83% |
| as_factor exp | 1 | 100% |
| fct exp | 3 | 100% |
| fct_anon exp | 1 | 100% |
| fct_c exp | 2 | 100% |
Datasets
| Name | Class | Rows × Cols | Also ships in |
|---|---|---|---|
| gss_cat | tbl_df/tbl/data.frame | 21,483 × 9 | – |
People & History
10 releases. Pick two to compare their code metrics. R releases are shown for context.
- RR 4.6.0 released · 2026-04-24
- 1.0.1Latest
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 1.0.02023-01-29 · diff ↗
- 0.5.22022-08-20 · diff ↗
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- 0.5.12021-01-27 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 0.5.02020-03-01 · diff ↗
- RR 3.6.0 released · 2019-04-26
- 0.4.02019-02-17 · diff ↗
- RR 3.5.0 released · 2018-04-23
- 0.3.02018-02-19 · diff ↗
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