Man pages for forcats
Tools for Working with Categorical Variables (Factors)

as_factorConvert input to a factor
fctCreate a factor
fct_anonAnonymise factor levels
fct_cConcatenate factors, combining levels
fct_collapseCollapse factor levels into manually defined groups
fct_countCount entries in a factor
fct_crossCombine levels from two or more factors to create a new...
fct_dropDrop unused levels
fct_expandAdd additional levels to a factor
fct_explicit_naMake missing values explicit
fct_inorderReorder factor levels by first appearance, frequency, or...
fct_lumpLump uncommon factor together levels into "other"
fct_matchTest for presence of levels in a factor
fct_na_value_to_levelConvert between 'NA' values and 'NA' levels
fct_otherManually replace levels with "other"
fct_recodeChange factor levels by hand
fct_relabelRelabel factor levels with a function, collapsing as...
fct_relevelReorder factor levels by hand
fct_reorderReorder factor levels by sorting along another variable
fct_revReverse order of factor levels
fct_shiftShift factor levels to left or right, wrapping around at end
fct_shuffleRandomly permute factor levels
fct_unifyUnify the levels in a list of factors
fct_uniqueUnique values of a factor, as a factor
forcats-packageforcats: Tools for Working with Categorical Variables...
gss_catA sample of categorical variables from the General Social...
lvlsLow-level functions for manipulating levels
lvls_unionFind all levels in a list of factors
pipePipe operator
forcats documentation built on Feb. 16, 2023, 8:57 p.m.