Handling Factors in R with the Forcats Package
Grace Tompkins, PhD
0:00 / 0:00
Handling Factors in R with the Forcats Package
110 просмотров · 11 месяцев назад
Grace Tompkins, PhD
353 подписчика
110 просмотров · 11 месяцев назад
In this video, we introduce factors (categorical variables) in R and talk about ways to utilize the forcats package to make our lives a bit easier!
Lecture Notes: https://ubc-stat.github.io/stat545/we...
New to dplyr and the tidyverse? Watch this first: • Dplyr - Data Manipulation in R (filter, se...
New to ggplot2? Head to this video: • Effective Data Visualization with ggplot2 ...
Time Stamps:
0:00: Intro
0:28: Loading in packages
0:51: Factors
2:13: Numeric Factors
4:13: Reordering Factors Manually
5:48: Reordering using Forcats' fct_freq()
7:38: Forcats' fct_rev()
7:57: Reordering directly in ggplot