Factors in R: Recode, Relevel, Reorder
HTML-код
- Опубликовано: 6 фев 2025
- Recode, relevel, and reorder factor variables in R with the {forcats} package. Easy!
If this vid helps you, please help me a tiny bit by mashing that 'like' button. For more #rstats joy, crush that 'subscribe' button!
that was great ,, am very impressed with the simplicity of how you can solve the matters . great job bro .. keep it up
u saved me for my final exam i love u so much
Love you right back!
Thank you so much .. have been spending literally hours on trying to relevel my factor levels...and thanks to you this works ! (none of the other ways did)
Great tutorial. Happy to have found your channel. Subscribed. I have my "go to" for each package and this was a spot-on quick review of the forcats which is not always intuitive to work with. 👍🎈
I cannot find either dataset. *Your videos are fantastic - I have completed #44 Factors, and wish to advaance to this (#45)
I'm slowly adding materials for old vids to my GitHub (github.com/equitable-equations/youtube). Thanks for your patience and support!!
Hello! Thank you so much for your great work, I'm very new to data analysis and your videos are a gem.
Could you please post the data sets used in this video to your github page? Highly appreciate, thanks in advance!
How do we fct_reorder a barplot when we are only using one axis(x) to measure count data?
You might be looking for fct_infreq().
@@EquitableEquations Thanks for the reply,think I figured it out with fct_reorder in the end but fct_infreq() might be worth looking into soon. Loving the videos 👍
Cool! Very useful. Thank you.
Thank you!
Thanks, I have been looking for a tutorial for fct_ functions.
Factors in R: Recode, Relevel, Reorder
Hi
This video really helped
Thank you for sharing
Can you please explain the difference between fct_reorder() and reorder()
Glad the vid was helpful!
These are similar functions. I tend to use {forcats} functions like fct_reorder() because of their common syntax and design philosophy. reorder() is part of base R.
@@EquitableEquations
Thanks for the reply and explanation
Keep up the good work
fct_relevel does not work for me. Keep getting error: could not find function "fct_relevel"
Hi! It's in the {forcats} package, which loads up with tidyverse. You probably forgot your library() command.
Hello please I did this command smp.l$prof
Hi! For specific questions like this, I'd recommend the R4DS learning community, for instance on Slack.