Working with factors and categorical variables. Use forcats in R programming to change factor levels

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ก.ย. 2024
  • R programming for beginners just got easier. If you're working with categorical variables or factors (as they are called in R) then you'll love the forcats package. Forcats lets you change factor levels in a number of exciting ways. If you are learning R programming, then you'll find this tremendously useful for anything related to categorical variables - be it data visualization, working with tables, doing a chi-squared test and more.
    This channel is supported by Nested Knowledge - an online platform that supports the entire literature review process. Please do check them out at this link: about.nested-k...?&RPYT

ความคิดเห็น • 59

  • @RProgramming101
    @RProgramming101  ปีที่แล้ว +1

    Get my FREE cheat sheets for R programming and statistics (including transcripts of these lessons) here: www.learnmore365.com/courses/rprogramming-resource-library

  • @MCshaneization
    @MCshaneization 2 ปีที่แล้ว +8

    Zooming in so we can watch on our phones is just one example of your fabulousness, you are the absolute GURU of R tutorials!

    • @RProgramming101
      @RProgramming101  2 ปีที่แล้ว

      So nice of you - thanks for the great feedback!

  • @brittnyfreeman3650
    @brittnyfreeman3650 2 ปีที่แล้ว +5

    The zoomed in text for cell phone viewers is such a nice touch! 👌 One if my favorite ways to consume your content!

    • @RProgramming101
      @RProgramming101  2 ปีที่แล้ว

      Glad you enjoy it! Thank you for the feedback!

  • @lody33100
    @lody33100 ปีที่แล้ว +5

    I swear you're unbelievably talented at all levels of creating content

    • @RProgramming101
      @RProgramming101  ปีที่แล้ว

      So nice of you - thanks for the great feedback!

  • @addopatrick6042
    @addopatrick6042 ปีที่แล้ว

    I can't but say, Greg, I admire you a lot.
    Thanks for this comprehensive and step-by-step video for us.

  • @prai452
    @prai452 2 ปีที่แล้ว +1

    Fabulous !!! Just excellent. You have been absolute savior! Thank you very much.

  • @moisengwa9904
    @moisengwa9904 2 ปีที่แล้ว +1

    Fabulous teacher!!! Could you please show us how to add the numbers to the bar charts?

  • @zanjeeltariq9079
    @zanjeeltariq9079 8 หลายเดือนก่อน

    THANKYOU SO MUCH!!!!!!

  • @josephkimote661
    @josephkimote661 2 ปีที่แล้ว

    Very helpful, invaluable programming.Keep more coming

    • @RProgramming101
      @RProgramming101  2 ปีที่แล้ว +2

      More to come! Glad it was helpful! ☺

  • @patrickrankin184
    @patrickrankin184 ปีที่แล้ว

    Great videos. Thank you

  • @castel32
    @castel32 5 หลายเดือนก่อน

    Thanks. This is great. But I was not able to make it work for my case. I have a stacked barplot with 3 categories (A,B,C) for each X and want to order by decreasing % of A regardless the other 2 values. Also, can you filter and sort the x factor in a certaing way and then save it/keep this way and use for the unfiltered data. Thanks a lot. Awesome content.

  • @godlovemehaha
    @godlovemehaha ปีที่แล้ว

    Just found your channel. Very helpful . Thank you

    • @RProgramming101
      @RProgramming101  ปีที่แล้ว

      Glad it was helpful! You're welcome :)

  • @draprincesa01
    @draprincesa01 2 ปีที่แล้ว

    the most amazing video ever , i just love all your videos

    • @RProgramming101
      @RProgramming101  2 ปีที่แล้ว

      Thanks for the great feedback Karen. Much appreciated!!

  • @laynehansen6216
    @laynehansen6216 7 หลายเดือนก่อน

    I need to change my text-based factors into numerical values and am having a hard time finding how to do this. Could someone give me some guidance to a video or blog? I need this in order to run some correlations and regressions.

  • @annasognosia
    @annasognosia 2 ปีที่แล้ว

    Thank you. It's very easy to follow.

  • @tuanatnguyen9878
    @tuanatnguyen9878 2 ปีที่แล้ว

    Really detailed and useful tutorial. Thanks a lot

    • @RProgramming101
      @RProgramming101  2 ปีที่แล้ว

      Glad it was helpful! Thank you for your feedback!

  • @romanvasiura6705
    @romanvasiura6705 ปีที่แล้ว

    Thank you for this amazing channel!

  • @InsideBest365
    @InsideBest365 ปีที่แล้ว

    Learned a lot thanks

  • @Sed157
    @Sed157 2 ปีที่แล้ว

    How could you get the exact number of a bar in these charts? What i mean is, you got the count at the y axis and you see approximately what the count is. Let’s say it is between 15.000 and 10.000 but you cannot tell the exact number. Is there any function to show either the exact number of the bar in/on the bar itself or to make the y axis with more detail so it is shown like this: 15.000 , 14.900, 14.800 …..

  • @onkar7651
    @onkar7651 ปีที่แล้ว

    super useful in visualization!!

  • @andresrengifo7801
    @andresrengifo7801 2 ปีที่แล้ว

    ¡Thanks this content expand the universe of r !

    • @RProgramming101
      @RProgramming101  2 ปีที่แล้ว +1

      Thanks for watching and you are welcome!

  • @greatmind3842
    @greatmind3842 2 ปีที่แล้ว

    This si helpful. Thanks so much. Please any videos on how to average scores on a multi-item scale? Is there anyway of reaching you for further questions? Thanks.

    • @johnmcghee3963
      @johnmcghee3963 ปีที่แล้ว

      I was thinking the same. I guess not 😂

  • @minjeoungkim9505
    @minjeoungkim9505 ปีที่แล้ว

    Really helpful. Thanks!

    • @RProgramming101
      @RProgramming101  ปีที่แล้ว

      Glad to hear it! Thank you for your feedback!

  • @angie-mx5gv
    @angie-mx5gv ปีที่แล้ว

    Thank you so much!

  • @Sports_Encyclopedia
    @Sports_Encyclopedia 2 ปีที่แล้ว

    Make a playlist regarding geo-density in mapping

  • @mugomuiruri2313
    @mugomuiruri2313 2 ปีที่แล้ว

    Very much explained.goood
    Afrika.kenya

  • @petongtitus
    @petongtitus ปีที่แล้ว

    when you use 'mutate(.)' (at minute: 20:17), does the original data change accordingly? so on the gss_cat %>% View() we will be seeing column 'partyid' in 4 categories instead of so many (i think about 10 categories)?

  • @mugomuiruri2313
    @mugomuiruri2313 2 ปีที่แล้ว

    I am getting you Loud and clear here in afrika place called kenya .world have become a small village really

    • @RProgramming101
      @RProgramming101  2 ปีที่แล้ว +1

      I've been to Kenya - what a lovely country. Say hello to your fellow countrymen for me please

    • @mugomuiruri2313
      @mugomuiruri2313 2 ปีที่แล้ว

      @@RProgramming101
      Welcome. I will greet all for you.Your teaching will go a long way if u didn't know.welcome

  • @mugomuiruri2313
    @mugomuiruri2313 ปีที่แล้ว

    Wonderful

  • @Sports_Encyclopedia
    @Sports_Encyclopedia 2 ปีที่แล้ว

    I have a small query can you help me with that. Please

    • @Sports_Encyclopedia
      @Sports_Encyclopedia 2 ปีที่แล้ว

      I have seen all you videos and always recommend you, will be thankful if you all me get out of this issue

  • @jackymo820
    @jackymo820 2 ปีที่แล้ว

    Don't quite get the difference between select (race) and pull (race)

    • @souhaibsebbane5623
      @souhaibsebbane5623 2 ปีที่แล้ว +1

      @Jacky Mo, He actually explained it, using SELECT will extract the race column as a DATA.FRAME, whereas using PULL will extract it as a FACTOR type which is the desired outcome in this case.

    • @jackymo820
      @jackymo820 2 ปีที่แล้ว

      @@souhaibsebbane5623 thanks. so we need to memorise which function takes data.frame which takes factor. Are there any tips on that?

  • @mphandejohn
    @mphandejohn 2 ปีที่แล้ว

    I now get forcats

  • @BulLiT2401
    @BulLiT2401 2 ปีที่แล้ว

    Thank you so much!