forcats: Tools for Working with Categorical Variables (Factors)
Version 0.2.0

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

Browse man pages Browse package API and functions Browse package files

AuthorHadley Wickham [aut, cre], RStudio [cph, fnd]
Date of publication2017-01-23 16:39:48
MaintainerHadley Wickham <hadley@rstudio.com>
LicenseGPL-3
Version0.2.0
URL http://forcats.tidyverse.org https://github.com/tidyverse/forcats
Package repositoryView on CRAN
InstallationInstall the latest version of this package by entering the following in R:
install.packages("forcats")

Man pages

as_factor: Convert input to a factor.
fct_anon: Anonymise factor levels
fct_c: Concatenate factors, combining levels
fct_collapse: Collapse factor levels into manually defined groups
fct_count: Count entries in a factor
fct_drop: Drop unused levels
fct_expand: Add additional levels to a factor
fct_explicit_na: Make missing values explicit
fct_inorder: Reorder factors levels by first appearance or frequency
fct_lump: Lump together least/most common factor levels into "other"
fct_other: Replace levels with "other"
fct_recode: Change factor levels by hand
fct_relabel: Automatically relabel factor levels, collapse as necessary
fct_relevel: Reorder factor levels by hand
fct_reorder: Reorder factor levels by sorting along another variable
fct_rev: Reverse order of factor levels
fct_shift: Shift factor levels to left or right, wrapping around at end
fct_shuffle: Randomly permute factor levels
fct_unify: Unify the levels in a list of factors
fct_unique: Unique values of a factor
forcats-package: forcats: Tools for Working with Categorical Variables...
gss_cat: A sample of categorical variables from the General Social...
lvls: Low-level functions for manipulating levels
lvls_union: Find all levels in a list of factors
pipe: Pipe operator

Functions

\%>\% Man page
as_factor Man page Source code
as_factor.character Man page Source code
as_factor.factor Man page Source code
check_factor Source code
check_factor_list Source code
check_recode_levels Source code
digits Source code
fct_anon Man page Source code
fct_c Man page Source code
fct_collapse Man page Source code
fct_count Man page Source code
fct_drop Man page Source code
fct_expand Man page Source code
fct_explicit_na Man page Source code
fct_infreq Man page Source code
fct_inorder Man page Source code
fct_lump Man page Source code
fct_other Man page Source code
fct_recode Man page Source code
fct_relabel Man page Source code
fct_relevel Man page Source code
fct_reorder Man page Source code
fct_reorder2 Man page Source code
fct_rev Man page Source code
fct_shift Man page Source code
fct_shuffle Man page Source code
fct_unify Man page Source code
fct_unique Man page Source code
forcats Man page
forcats-package Man page
gss_cat Man page
has_level Source code
in_smallest Source code
last2 Source code
lump_cutoff Source code
lvls Man page
lvls_expand Man page Source code
lvls_reorder Man page Source code
lvls_revalue Man page Source code
lvls_seq Source code
lvls_union Man page Source code
refactor Source code
shift Source code
zero_pad Source code

Files

tests
tests/testthat.R
tests/testthat
tests/testthat/helper-lump.R
tests/testthat/test-fct_c.R
tests/testthat/test-fct_lump.R
tests/testthat/test-as_factor.R
tests/testthat/test-fct_relabel.R
tests/testthat/test-fct_reorder.R
tests/testthat/test-fct_drop.R
tests/testthat/test-lvls_reorder.R
tests/testthat/test-lvls.R
tests/testthat/test-fct_other.R
tests/testthat/test-fct_recode.R
tests/testthat/test-fct_relevel.R
NAMESPACE
NEWS.md
data
data/gss_cat.rda
R
R/relevel.R
R/shift.R
R/reorder.R
R/utils.R
R/drop.R
R/count.R
R/relabel.R
R/c.R
R/forcats-package.R
R/shuffle.R
R/as_factor.R
R/data.R
R/lump.R
R/recode.R
R/unique.R
R/rev.R
R/lvls.R
R/expand.R
R/collapse.R
R/explicit_na.R
R/anon.R
R/other.R
README.md
MD5
DESCRIPTION
man
man/pipe.Rd
man/fct_count.Rd
man/fct_relevel.Rd
man/fct_other.Rd
man/fct_collapse.Rd
man/fct_recode.Rd
man/gss_cat.Rd
man/lvls.Rd
man/fct_drop.Rd
man/fct_reorder.Rd
man/forcats-package.Rd
man/lvls_union.Rd
man/fct_unify.Rd
man/as_factor.Rd
man/fct_rev.Rd
man/fct_expand.Rd
man/fct_anon.Rd
man/fct_unique.Rd
man/fct_shuffle.Rd
man/fct_relabel.Rd
man/fct_shift.Rd
man/fct_inorder.Rd
man/fct_c.Rd
man/fct_explicit_na.Rd
man/fct_lump.Rd
forcats documentation built on May 20, 2017, 4:21 a.m.