Tools for Working with Categorical Variables (Factors)

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_cross | Combine levels from two or more factors to create a new... |

fct_drop | Drop unused levels |

fct_expand | Add additional levels to a factor |

fct_explicit_na | Make missing values explicit |

fct_inorder | Reorder factor levels by first appearance, frequency, or... |

fct_lump | Lump together factor levels into "other" |

fct_match | Test for presence of levels in a factor |

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 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.