R programming for beginners: Rename variables and reorder columns. Data cleaning and manipulation.

Поделиться
HTML-код
  • Опубликовано: 21 авг 2024

Комментарии • 49

  • @RProgramming101
    @RProgramming101  Год назад

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

  • @jd5481
    @jd5481 2 года назад +2

    I love this guy. Short, no BS, well-presented and approachable tips for programming dunces like me. Subscribed.

  • @MR-eg6np
    @MR-eg6np 4 года назад +8

    SO HAPPY you have a new video. I have learned so much with you, thank you for doing this!

  • @geron-talk3982
    @geron-talk3982 3 года назад +3

    You just have the best R tutorial so far that I have seen. Love it soooooo much. And thank you.

  • @aperson1181
    @aperson1181 4 года назад +4

    Yeah, he is BACK !!!

  • @balatangiisuran5403
    @balatangiisuran5403 4 года назад +2

    Looking forward to see more video on R

    • @gregmartin
      @gregmartin 4 года назад +2

      Thanks - will be creating more for sure :)

    • @shariqueabraar4105
      @shariqueabraar4105 4 года назад

      @@gregmartin I love your videos please teach us more.

  • @bettywhite6672
    @bettywhite6672 2 года назад +1

    You have the best videos ! You make it fun and super duper easy 😂

  • @nth.education
    @nth.education 2 года назад

    Real smooth, thanks for keeping it simple and straight forward :)

    • @RProgramming101
      @RProgramming101  2 года назад

      So happy to hear that! You are most welcome!

  • @alishertlessov5806
    @alishertlessov5806 Год назад

    The best!!!

  • @isaactengey8543
    @isaactengey8543 2 года назад +1

    THE BEST!!!

  • @haroldmsolomon
    @haroldmsolomon 4 года назад

    Short and to the point. :)

  • @user-pu9ll7vd5m
    @user-pu9ll7vd5m 4 месяца назад

    Thanks - 🙂

  • @shamirgeorge
    @shamirgeorge 4 года назад

    Nice one!

  • @arcanepersona1676
    @arcanepersona1676 2 года назад

    Excellent .. thanks a lot

  • @MrJ691
    @MrJ691 Год назад +1

    Is there an easy way to rename 150 variables without writing in each variables old and new name?

  • @icedsolid
    @icedsolid Год назад

    Handy tip for anyone following: If you want to rename AFTER you have already renamed, you need to put the changed variable name into the select() field so it retrieves the new variable that can then be renamed for a second time.
    starwars_mod % #storing the starwars dataframe into new dataframe called starwars_mod
    select(sex, mass, height, species, everything()) %>% #orders specified columns and puts all everything else after.
    rename(gender_true = sex) #changing variable name from "sex" to "gender_true"
    Second renaming code
    starwars_mod % #storing the starwars dataframe into new dataframe called starwars_mod
    select(sex, mass, height, species, everything()) %>% #NOTE that variable sex must be renamed to the new variable name gender_true
    rename(gender_2ndRename = gender_true) #changing the renamed variable again but to "gender_2ndRename"

  • @mambachiyengo379
    @mambachiyengo379 2 года назад

    I'm really enjoying your videos. are you able to make a video on data merging?

  • @heartheart5543
    @heartheart5543 3 года назад

    so clear, thank you

  • @facr
    @facr 4 года назад

    Nice tutorial. Any chance to see tutorials on how to use R with spark?

  • @ricardojescorcia214
    @ricardojescorcia214 4 года назад +2

    I get an error "object not found" eventhough the variable appears in the header., so i´ve been unable to rename it. Any help? I already checked for misspelling

    • @mainagmaina7493
      @mainagmaina7493 3 года назад +1

      check if you are capitalizing a letter of the header or vice versa.... R is case sensitive

    • @user-pu9ll7vd5m
      @user-pu9ll7vd5m 4 месяца назад

      You could miss the %>% at select( ) statement

  • @LlaranTurner
    @LlaranTurner 3 года назад +1

    Quick question: When I renamed the mass column weight, the console showed a change in the name but the actual graph still remains as mass. How do I fix that?
    ]

    • @93Royston
      @93Royston Год назад

      I think you should check which variable you are using for making the plot. In the above example, the variable mass is renamed to weight and is stored in sw, not in starwars. So while making your graph you should use sw.

  • @ricardoansantos
    @ricardoansantos 4 года назад

    Long time no see!

  • @juanaguirre3702
    @juanaguirre3702 Месяц назад

    How do I save that rename? When I bring the data set back up it reverts back to its original names

  • @user-lz2zs9xx7k
    @user-lz2zs9xx7k Год назад

    Error in rename(., weight = mass) : unused argument (weight = mass)

  • @ItsADrunkWorld
    @ItsADrunkWorld 2 года назад

    Hello i imported an excel sheet and the name of the column is an entire question. How can i rename it?

  • @Maryjanesdreamland
    @Maryjanesdreamland 8 месяцев назад

    Do you have data sets available for us to download for practice?

  • @JournalKannada
    @JournalKannada 7 месяцев назад +1

    2:51 booya shaka😂😂

  • @rohanarora3266
    @rohanarora3266 Год назад +1

    Hi is the pipe operator can be used only with tidy verse package? Or we can use it in any other data?

    • @93Royston
      @93Royston Год назад

      Only with tidyverse package, as per my understanding

  • @arnabmunshi
    @arnabmunshi 4 года назад

    I am a PHP MySQL developer ... so can i implement R with PHP-MySQL ?

  • @creativedoctor9253
    @creativedoctor9253 Год назад

    Error in `rename()`:
    ! Can't rename columns that don't exist.
    ✖ Column `mm` doesn't exist.
    Backtrace:
    1. gbdata2 %>% select(compliance_to_tt_in_mon) %>% ...
    3. dplyr:::rename.data.frame(., compliance_to_tt_in_mo = mm)

  • @RodBarkerdigitalmediablog
    @RodBarkerdigitalmediablog 2 года назад

    sw = starwars %>%
    select(name,mass, height) %>%
    rename( mass = weight) code did not change the starwars dataset mass to weight

    • @alanhlam
      @alanhlam Год назад

      Same. Tidyverse must have been updated from when this video was produced, but you have to do rename(weight=mass):
      sw=starwars %>%
      select(name,mass,height) %>%
      rename(weight=mass)

  • @pratiksapkota5083
    @pratiksapkota5083 2 года назад

    man i just wanted to see how you put categories on first row in respective columns and adjacent data🤕

  • @ramthakur7981
    @ramthakur7981 4 года назад

    I heard the creator of this video passed away . Is that true