How to reorder factors in R (the easy way)

Описание к видео How to reorder factors in R (the easy way)

In this video I show you the best way to reorder factors in R.
You can use a simple trick with arrange and mutate or use stats::reorder() function. The forcats::fct_reorder() function makes reordering factors even easier. And if you ever want to reorder factors for multiple categories all at once you should be aware of tidytext::reorder_within() function in combination with facet_wrap().

⏱ Time Stamps ⌚

0:00 - Intro and video overview
0:30 - Reorder trick with arrange and mutate
4:40 - Order factors with stats::reorder
5:40 - Order factors with forcats::fct_reorder
6:45 - Order for multiple variables with tidytext::reorder_within
9:40 - Thank you Outro

Background Music:
   • PARASITE EVE 2 SOUNDTRACK AMBIENT MIX  
Sound effects obtained from https://www.zapsplat.com/

Комментарии

Информация по комментариям в разработке