How to reorder factors in R (the easy way)

Поділитися
Вставка
  • Опубліковано 21 гру 2024

КОМЕНТАРІ • 10

  • @forrestoakley4882
    @forrestoakley4882 2 роки тому +2

    I've just discovered your channel. It is a real treasure. Thank you very much!!!!!

    • @TheDataDigest
      @TheDataDigest  2 роки тому +1

      Thanks for leaving a comment. I am glad you enjoy the content. It has been a long dream of mine to make UA-cam videos as I like teaching, statistics and R-programming. I wish I could produce more videos but I think the first 2 years have been only the beginning. A lot more to come. I hope you come along on the ride :)

    • @forrestoakley4882
      @forrestoakley4882 2 роки тому

      @@TheDataDigest I sure will!

    • @maxmiller_inbound
      @maxmiller_inbound 2 роки тому

      Same here! Great and really helped me understand this! THX! :)

  • @seb5542
    @seb5542 11 місяців тому +1

    I've been using reorder() in my aes() to reorder a bar graph, and I've come into an issue where it has caused all my bars to appear on the Y axis. It's the only reordering tool that has worked. But I've found this problem to be incredibly annoying, especially since no one has spoken about it. And it doesn't flip any of the other bits of data, just the bars themselves.

    • @TheDataDigest
      @TheDataDigest  11 місяців тому +1

      Hi seb, do you mind sending an example with the code to this email (question[at]thedatadigest[dot]email). I might have experienced something similar myself and can probably help. I found it safer to do the reordering before the plotting.

    • @seb5542
      @seb5542 11 місяців тому +1

      @@TheDataDigest thank you very much, I've sent an email. I really appreciate it. I can't find anything about my issue online.

    • @TheDataDigest
      @TheDataDigest  11 місяців тому

      @@seb5542 What a weird little problem. I just answered your email and you simply switched the variables in the reorder function and and then in aes() as well for x and y-values. No biggy :)

  • @corylowe5557
    @corylowe5557 7 місяців тому

    Awesome!

  • @stevennye5075
    @stevennye5075 2 роки тому

    great video, just the right spped.