{
  "_id": "6a12a348acfb0bcc41d12597",
  "Package": "forcats",
  "Title": "Tools for Working with Categorical Variables (Factors)",
  "Version": "1.0.1.9000",
  "Authors@R": "c(\nperson(\"Hadley\", \"Wickham\", , \"hadley@posit.co\", role = c(\"aut\", \"cre\")),\nperson(\"Posit Software, PBC\", role = c(\"cph\", \"fnd\"),\ncomment = c(ROR = \"03wc8by49\"))\n)",
  "Description": "Helpers for reordering factor levels (including moving\nspecified levels to front, ordering by first appearance,\nreversing, and randomly shuffling), and tools for modifying\nfactor levels (including collapsing rare levels into other,\n'anonymising', and manually 'recoding').",
  "License": "MIT + file LICENSE",
  "URL": "https://forcats.tidyverse.org/,\nhttps://github.com/tidyverse/forcats",
  "BugReports": "https://github.com/tidyverse/forcats/issues",
  "VignetteBuilder": "knitr",
  "Config/Needs/website": "tidyverse/tidytemplate",
  "Config/testthat/edition": "3",
  "Encoding": "UTF-8",
  "LazyData": "true",
  "Roxygen": "list(markdown = TRUE)",
  "RoxygenNote": "7.3.3",
  "Repository": "https://tidyverse.r-universe.dev",
  "Date/Publication": "2026-02-02 17:13:08 UTC",
  "RemoteUrl": "https://github.com/tidyverse/forcats",
  "RemoteRef": "HEAD",
  "RemoteSha": "f83e0e682d9f874d066630ff78eb12586b5b2a32",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-24 06:50:15 UTC",
    "User": "root"
  },
  "Author": "Hadley Wickham [aut, cre],\nPosit Software, PBC [cph, fnd] (ROR: <https://ror.org/03wc8by49>)",
  "Maintainer": "Hadley Wickham <hadley@posit.co>",
  "MD5sum": "9233c7712d2cd34378c17cea5beaf487",
  "_user": "tidyverse",
  "_type": "src",
  "_file": "forcats_1.0.1.9000.tar.gz",
  "_fileid": "fb9ad55e76f941a982cc719d14fc821c55412dea6d094529459b2e83fed85d72",
  "_filesize": 528719,
  "_sha256": "fb9ad55e76f941a982cc719d14fc821c55412dea6d094529459b2e83fed85d72",
  "_created": "2026-05-24T06:50:15.000Z",
  "_published": "2026-05-24T07:05:44.091Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 77578434841,
      "time": 175,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7183026284"
    },
    {
      "job": 77578434837,
      "time": 120,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7183020802"
    },
    {
      "job": 77578434836,
      "time": 86,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7183098163"
    },
    {
      "job": 77578434847,
      "time": 114,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7183101532"
    },
    {
      "job": 77578273750,
      "time": 178,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7183007529"
    },
    {
      "job": 77578434838,
      "time": 107,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7183019442"
    },
    {
      "job": 77578434845,
      "time": 83,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7183016977"
    },
    {
      "job": 77578434840,
      "time": 90,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7183017753"
    },
    {
      "job": 77578434844,
      "time": 77,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7183016427"
    }
  ],
  "_buildurl": "https://github.com/r-universe/tidyverse/actions/runs/26354365749",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/tidyverse/forcats",
  "_commit": {
    "id": "f83e0e682d9f874d066630ff78eb12586b5b2a32",
    "author": "Hadley Wickham <h.wickham@gmail.com>",
    "committer": "GitHub <noreply@github.com>",
    "message": "Update for latest air (#390)\n\n",
    "time": 1770052388
  },
  "_maintainer": {
    "name": "Hadley Wickham",
    "email": "hadley@posit.co",
    "login": "hadley",
    "bluesky": "@hadley.nz",
    "description": "Chief Scientist at @posit-pbc",
    "uuid": 4196
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.1",
      "role": "Depends"
    },
    {
      "package": "cli",
      "version": ">= 3.4.0",
      "role": "Imports"
    },
    {
      "package": "glue",
      "role": "Imports"
    },
    {
      "package": "lifecycle",
      "role": "Imports"
    },
    {
      "package": "magrittr",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "version": ">= 1.0.0",
      "role": "Imports"
    },
    {
      "package": "tibble",
      "role": "Imports"
    },
    {
      "package": "covr",
      "role": "Suggests"
    },
    {
      "package": "dplyr",
      "role": "Suggests"
    },
    {
      "package": "ggplot2",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "readr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    },
    {
      "package": "withr",
      "role": "Suggests"
    }
  ],
  "_owner": "tidyverse",
  "_selfowned": true,
  "_usedby": 1359,
  "_updates": [
    {
      "week": "2025-33",
      "n": 5
    },
    {
      "week": "2025-34",
      "n": 2
    },
    {
      "week": "2025-39",
      "n": 6
    },
    {
      "week": "2026-06",
      "n": 4
    }
  ],
  "_tags": [
    {
      "name": "v1.0.1",
      "date": "2025-09-24"
    }
  ],
  "_topics": [
    "factor",
    "tidyverse"
  ],
  "_stars": 557,
  "_contributors": [
    {
      "user": "hadley",
      "count": 282,
      "uuid": 4196
    },
    {
      "user": "batpigandme",
      "count": 15,
      "uuid": 831732
    },
    {
      "user": "robinsones",
      "count": 11,
      "uuid": 17410158
    },
    {
      "user": "krlmlr",
      "count": 4,
      "uuid": 1741643
    },
    {
      "user": "jennybc",
      "count": 4,
      "uuid": 599454
    },
    {
      "user": "gtm19",
      "count": 3,
      "uuid": 9137502
    },
    {
      "user": "lionel-",
      "count": 3,
      "uuid": 4465050
    },
    {
      "user": "kbodwin",
      "count": 2,
      "uuid": 22135489
    },
    {
      "user": "zhiiiyang",
      "count": 2,
      "uuid": 7269113
    },
    {
      "user": "yimingli",
      "count": 2,
      "uuid": 4153781
    },
    {
      "user": "pursuitofdatascience",
      "count": 2,
      "uuid": 54338793
    },
    {
      "user": "rtaph",
      "count": 2,
      "uuid": 9271253
    },
    {
      "user": "jtr13",
      "count": 2,
      "uuid": 14161912
    },
    {
      "user": "jonocarroll",
      "count": 2,
      "uuid": 9496865
    },
    {
      "user": "yeedle",
      "count": 1,
      "uuid": 16637880
    },
    {
      "user": "luisdva",
      "count": 1,
      "uuid": 5580938
    },
    {
      "user": "lwjohnst86",
      "count": 1,
      "uuid": 6662983
    },
    {
      "user": "mahjabinoyshi",
      "count": 1,
      "uuid": 197597579
    },
    {
      "user": "malcolmbarrett",
      "count": 1,
      "uuid": 23123711
    },
    {
      "user": "mine-cetinkaya-rundel",
      "count": 1,
      "uuid": 5965649
    },
    {
      "user": "mitchelloharawild",
      "count": 1,
      "uuid": 16127127
    },
    {
      "user": "monicagerber",
      "count": 1,
      "uuid": 4185874
    },
    {
      "user": "njspix",
      "count": 1,
      "uuid": 56930974
    },
    {
      "user": "riinuots",
      "count": 1,
      "uuid": 19186958
    },
    {
      "user": "ryo-n7",
      "count": 1,
      "uuid": 19657164
    },
    {
      "user": "salim-b",
      "count": 1,
      "uuid": 20040931
    },
    {
      "user": "808sandbr",
      "count": 1,
      "uuid": 7990602
    },
    {
      "user": "sinarueeger",
      "count": 1,
      "uuid": 4454726
    },
    {
      "user": "tklebel",
      "count": 1,
      "uuid": 9658522
    },
    {
      "user": "tslumley",
      "count": 1,
      "uuid": 8380349
    },
    {
      "user": "eipi10",
      "count": 1,
      "uuid": 436817
    },
    {
      "user": "mgacc0",
      "count": 1,
      "uuid": 7735126
    },
    {
      "user": "vincentguyader",
      "count": 1,
      "uuid": 10470699
    },
    {
      "user": "yutannihilation",
      "count": 1,
      "uuid": 1978793
    },
    {
      "user": "adam-akong",
      "count": 1,
      "uuid": 125315600
    },
    {
      "user": "alberthkcheng",
      "count": 1,
      "uuid": 8752614
    },
    {
      "user": "ameliamn",
      "count": 1,
      "uuid": 2576787
    },
    {
      "user": "andrewkinsman",
      "count": 1,
      "uuid": 7247251
    },
    {
      "user": "billdenney",
      "count": 1,
      "uuid": 10359931
    },
    {
      "user": "barkleybg",
      "count": 1,
      "uuid": 12898994
    },
    {
      "user": "ismayc",
      "count": 1,
      "uuid": 9215614
    },
    {
      "user": "colinbrislawn",
      "count": 1,
      "uuid": 10355152
    },
    {
      "user": "dpprdan",
      "count": 1,
      "uuid": 1423562
    },
    {
      "user": "davidchall",
      "count": 1,
      "uuid": 1804856
    },
    {
      "user": "wilkox",
      "count": 1,
      "uuid": 726198
    },
    {
      "user": "sellisd",
      "count": 1,
      "uuid": 7484504
    },
    {
      "user": "math-mcshane",
      "count": 1,
      "uuid": 48807452
    },
    {
      "user": "alistaire47",
      "count": 1,
      "uuid": 1693477
    },
    {
      "user": "gregrs-uk",
      "count": 1,
      "uuid": 7353938
    },
    {
      "user": "jeroenjanssens",
      "count": 1,
      "uuid": 1368256
    },
    {
      "user": "jimhester",
      "count": 1,
      "uuid": 205275
    },
    {
      "user": "johngoldin",
      "count": 1,
      "uuid": 11657612
    },
    {
      "user": "khusmann",
      "count": 1,
      "uuid": 167160
    }
  ],
  "_userbio": {
    "uuid": 22032646,
    "type": "organization",
    "name": "tidyverse",
    "description": "The tidyverse is a collection of R packages that share common principles and are designed to work together seamlessly"
  },
  "_downloads": {
    "count": 554640,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/forcats"
  },
  "_mentions": 33,
  "_devurl": "https://github.com/tidyverse/forcats",
  "_pkgdown": "https://forcats.tidyverse.org/",
  "_searchresults": 28928,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/forcats.html",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/tidyverse/forcats",
  "_realowner": "tidyverse",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.1.0",
      "date": "2016-08-29"
    },
    {
      "version": "0.1.1",
      "date": "2016-09-15"
    },
    {
      "version": "0.2.0",
      "date": "2017-01-25"
    },
    {
      "version": "0.3.0",
      "date": "2018-02-19"
    },
    {
      "version": "0.4.0",
      "date": "2019-02-17"
    },
    {
      "version": "0.5.0",
      "date": "2020-03-01"
    },
    {
      "version": "0.5.1",
      "date": "2021-01-27"
    },
    {
      "version": "0.5.2",
      "date": "2022-08-19"
    },
    {
      "version": "1.0.0",
      "date": "2023-01-30"
    },
    {
      "version": "1.0.1",
      "date": "2025-09-25"
    }
  ],
  "_exports": [
    "%>%",
    "as_factor",
    "fct",
    "fct_anon",
    "fct_c",
    "fct_collapse",
    "fct_count",
    "fct_cross",
    "fct_drop",
    "fct_expand",
    "fct_explicit_na",
    "fct_infreq",
    "fct_inorder",
    "fct_inseq",
    "fct_lump",
    "fct_lump_lowfreq",
    "fct_lump_min",
    "fct_lump_n",
    "fct_lump_prop",
    "fct_match",
    "fct_na_level_to_value",
    "fct_na_value_to_level",
    "fct_other",
    "fct_recode",
    "fct_relabel",
    "fct_relevel",
    "fct_reorder",
    "fct_reorder2",
    "fct_rev",
    "fct_shift",
    "fct_shuffle",
    "fct_unify",
    "fct_unique",
    "first2",
    "last2",
    "lvls_expand",
    "lvls_reorder",
    "lvls_revalue",
    "lvls_union"
  ],
  "_datasets": [
    {
      "name": "gss_cat",
      "title": "A sample of categorical variables from the General Social survey",
      "object": "gss_cat",
      "class": [
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "year",
        "marital",
        "age",
        "race",
        "rincome",
        "partyid",
        "relig",
        "denom",
        "tvhours"
      ],
      "rows": 21483,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "as_factor",
      "title": "Convert input to a factor",
      "topics": [
        "as_factor",
        "as_factor.character",
        "as_factor.factor",
        "as_factor.logical",
        "as_factor.numeric"
      ]
    },
    {
      "page": "fct",
      "title": "Create a factor",
      "topics": [
        "fct"
      ]
    },
    {
      "page": "fct_anon",
      "title": "Anonymise factor levels",
      "topics": [
        "fct_anon"
      ]
    },
    {
      "page": "fct_c",
      "title": "Concatenate factors, combining levels",
      "topics": [
        "fct_c"
      ]
    },
    {
      "page": "fct_collapse",
      "title": "Collapse factor levels into manually defined groups",
      "topics": [
        "fct_collapse"
      ]
    },
    {
      "page": "fct_count",
      "title": "Count entries in a factor",
      "topics": [
        "fct_count"
      ]
    },
    {
      "page": "fct_cross",
      "title": "Combine levels from two or more factors to create a new factor",
      "topics": [
        "fct_cross"
      ]
    },
    {
      "page": "fct_drop",
      "title": "Drop unused levels",
      "topics": [
        "fct_drop"
      ]
    },
    {
      "page": "fct_expand",
      "title": "Add additional levels to a factor",
      "topics": [
        "fct_expand"
      ]
    },
    {
      "page": "fct_inorder",
      "title": "Reorder factor levels by first appearance, frequency, or numeric order",
      "topics": [
        "fct_infreq",
        "fct_inorder",
        "fct_inseq"
      ]
    },
    {
      "page": "fct_lump_helpers",
      "title": "Lump uncommon factor levels together into \"other\"",
      "topics": [
        "fct_lump_helpers",
        "fct_lump_lowfreq",
        "fct_lump_min",
        "fct_lump_n",
        "fct_lump_prop"
      ]
    },
    {
      "page": "fct_match",
      "title": "Test for presence of levels in a factor",
      "topics": [
        "fct_match"
      ]
    },
    {
      "page": "fct_na_value_to_level",
      "title": "Convert between 'NA' values and 'NA' levels",
      "topics": [
        "fct_na_level_to_value",
        "fct_na_value_to_level"
      ]
    },
    {
      "page": "fct_other",
      "title": "Manually replace levels with \"other\"",
      "topics": [
        "fct_other"
      ]
    },
    {
      "page": "fct_recode",
      "title": "Change factor levels by hand",
      "topics": [
        "fct_recode"
      ]
    },
    {
      "page": "fct_relabel",
      "title": "Relabel factor levels with a function, collapsing as necessary",
      "topics": [
        "fct_relabel"
      ]
    },
    {
      "page": "fct_relevel",
      "title": "Reorder factor levels by hand",
      "topics": [
        "fct_relevel"
      ]
    },
    {
      "page": "fct_reorder",
      "title": "Reorder factor levels by sorting along another variable",
      "topics": [
        "fct_reorder",
        "fct_reorder2",
        "first2",
        "last2"
      ]
    },
    {
      "page": "fct_rev",
      "title": "Reverse order of factor levels",
      "topics": [
        "fct_rev"
      ]
    },
    {
      "page": "fct_shift",
      "title": "Shift factor levels to left or right, wrapping around at end",
      "topics": [
        "fct_shift"
      ]
    },
    {
      "page": "fct_shuffle",
      "title": "Randomly permute factor levels",
      "topics": [
        "fct_shuffle"
      ]
    },
    {
      "page": "fct_unify",
      "title": "Unify the levels in a list of factors",
      "topics": [
        "fct_unify"
      ]
    },
    {
      "page": "fct_unique",
      "title": "Unique values of a factor, as a factor",
      "topics": [
        "fct_unique"
      ]
    },
    {
      "page": "gss_cat",
      "title": "A sample of categorical variables from the General Social survey",
      "topics": [
        "gss_cat"
      ]
    },
    {
      "page": "lvls",
      "title": "Low-level functions for manipulating levels",
      "topics": [
        "lvls",
        "lvls_expand",
        "lvls_reorder",
        "lvls_revalue"
      ]
    },
    {
      "page": "lvls_union",
      "title": "Find all levels in a list of factors",
      "topics": [
        "lvls_union"
      ]
    }
  ],
  "_pkglogo": "https://github.com/tidyverse/forcats/raw/HEAD/man/figures/logo.png",
  "_readme": "https://github.com/tidyverse/forcats/raw/HEAD/README.md",
  "_rundeps": [
    "cli",
    "glue",
    "lifecycle",
    "magrittr",
    "pillar",
    "pkgconfig",
    "rlang",
    "tibble",
    "utf8",
    "vctrs"
  ],
  "_vignettes": [
    {
      "source": "forcats.Rmd",
      "filename": "forcats.html",
      "title": "Introduction to forcats",
      "author": "Emily Robinson",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Ordering by frequency",
        "NAs in levels and values",
        "Combining levels",
        "Ordering by another variable",
        "Manually reordering"
      ],
      "created": "2019-01-19 17:34:14",
      "modified": "2025-09-24 14:25:26",
      "commits": 9
    }
  ],
  "_score": 19.578558841910652,
  "_indexed": true,
  "_nocasepkg": "forcats",
  "_universes": [
    "tidyverse",
    "hadley"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.0.1.9000",
      "date": "2026-05-24T06:53:02.000Z",
      "distro": "noble",
      "commit": "f83e0e682d9f874d066630ff78eb12586b5b2a32",
      "fileid": "485bf3893e608d433ca616b14d35aed4ca8ed97b7575ddf8ce284fa953281db3",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tidyverse/actions/runs/26354365749"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.0.1.9000",
      "date": "2026-05-24T06:52:09.000Z",
      "distro": "noble",
      "commit": "f83e0e682d9f874d066630ff78eb12586b5b2a32",
      "fileid": "ad7f5a20e30cb2ed2e7ca5b01c58f1f207addd34af24001cf3324b2688b88275",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tidyverse/actions/runs/26354365749"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.0.1.9000",
      "date": "2026-05-24T07:04:45.000Z",
      "commit": "f83e0e682d9f874d066630ff78eb12586b5b2a32",
      "fileid": "d9b002a097c81f3946915ebc9cafeb64d60084c863fc40b0ef1afa9c7dbd98d3",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tidyverse/actions/runs/26354365749"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "1.0.1.9000",
      "date": "2026-05-24T07:05:07.000Z",
      "commit": "f83e0e682d9f874d066630ff78eb12586b5b2a32",
      "fileid": "b8d83600b27cbccc5f14dabd936ebd73ae29608ef671227a57c548364a3ebaff",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tidyverse/actions/runs/26354365749"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "1.0.1.9000",
      "date": "2026-05-24T06:52:18.000Z",
      "commit": "f83e0e682d9f874d066630ff78eb12586b5b2a32",
      "fileid": "e820c5785208e0b1397b5e7f83948f45627a6f8e4f6f53397660291eddf0908d",
      "status": "success",
      "buildurl": "https://github.com/r-universe/tidyverse/actions/runs/26354365749"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.0.1.9000",
      "date": "2026-05-24T06:51:27.000Z",
      "commit": "f83e0e682d9f874d066630ff78eb12586b5b2a32",
      "fileid": "da340444fcc8131763b7f1c1165ffe89dffaabef62a90293b45fdf479b05071d",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tidyverse/actions/runs/26354365749"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "1.0.1.9000",
      "date": "2026-05-24T06:51:35.000Z",
      "commit": "f83e0e682d9f874d066630ff78eb12586b5b2a32",
      "fileid": "57a64426630f7e6d9be76f19671d292b47831d47bdda08b06df4f3d9d889a1f2",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tidyverse/actions/runs/26354365749"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "1.0.1.9000",
      "date": "2026-05-24T06:51:20.000Z",
      "commit": "f83e0e682d9f874d066630ff78eb12586b5b2a32",
      "fileid": "56b5e6419c66c36b14c6cfbba61ea86690d87f83c194ca25ebb61f4ce946cfca",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tidyverse/actions/runs/26354365749"
    }
  ]
}