10 data filtering tips using R programming. Use the tidyverse to filter and subset your data.

Поделиться
HTML-код
  • Опубликовано: 15 июл 2024
  • In this video you'll learn 10 different ways to filter and subset your data using R programming. This is an R programming for beginners video and forms part of a data cleaning and data manipulation series. If you are interested in statistics, data science, R programming or quantitative research, then this video is a must watch.

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

  • @RProgramming101
    @RProgramming101  11 месяцев назад

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

  • @muwongejosephjunior6131
    @muwongejosephjunior6131 4 года назад +30

    "Boom shaka laka!"
    Thank you Greg, we appreciate these videos!

  • @lindasturm-flores6752
    @lindasturm-flores6752 3 года назад +30

    I was about to give up on learning R when I came across your videos. I'm finally making progress! Thanks so much.

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

    there are tons of really smart people out there that can't teach, this man really knows how to teach, he understands learning.

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

      So nice of you - thanks for the great feedback!

  • @eddieramosgarcia9057
    @eddieramosgarcia9057 2 года назад +5

    I'm following a course in Linkedin about mastering "R", however, I'm mastering it with your content instead, thanks so much !!!

  • @rogerwilkins9701
    @rogerwilkins9701 4 года назад +1

    Amazing videos! Please don't stop doing these! they're so useful and well done

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

    Please keep the videos coming my friend. You are providing an invaluable service, and the quality of these videos are top notch!

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

    You're awesome been a teacher! Thank you.

  • @sofiaferreira7356
    @sofiaferreira7356 4 года назад +1

    Very informative and concise video! Please keep doing more!!

  • @ellieanderson767
    @ellieanderson767 3 года назад +7

    Greg, I've watched all your videos and they're so helpful! Would you be willing to create some videos highlighting different types of data visualization?

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

    I found your videos very important as a beginner in using R. Thank you.

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

    Great tutorial as always. Amazing filtering skills to command for any aspiring data analyst

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

    Well explained, easy to understand . Thanks for you great effort!

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

    you not only teach in a way very easy way to learn for anyone but you also make it fun so I want to learn more and more! Thank-you very much sir, God bless.

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

    I am trying to work on a case study and this saved me so many hours of confusion and frustration. The filter part where are you added the == | sign was so helpful

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

    Excellent !! Making it so easy to learn R. Thank you. Looking forward to more videos.

    • @RProgramming101
      @RProgramming101  4 года назад +1

      Thanks for the comment 😀. More videos to come.

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

    Great to see you're still making videos, they are extremely helpful for getting to know R

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

      Glad you like them! Glad it was helpful! Thank you :)

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

    Information is presented with clarity and video is well produced.

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

    thank you so much, so clear and informative

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

    Sometimes when I get really stuck I wish I could just share my screen and ask you 100 questions, like right now for instance haha anyways thanks for videos they have been tremendously helpful!

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

    Thank you so much!!!!! You just made my day with the "filter and between".

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

    Love the way you edit.

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

    Really good channel, can't wait to see your next video. Thank you for sharing

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

    Thank you so much! More video Please.
    Bless you.

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

    You're an outstanding teacher and sparked my interest in delving deeper into R. Profound regards.

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

    Thank you so much! There's a ton of videos on how to remove NAs and change NAs. This was the first video that shows how to create a dataset with only NAs! Thank you

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

      You're welcome! Thank you for the feedback, Brianne 👍👍

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

    I didn't know about between() and near(). This is really helpful. Thank you very much!

  • @edgarsmeets7519
    @edgarsmeets7519 11 месяцев назад

    It worked well for me, except one thing: after the exclamation mark, a space should be entered. Nice video's, Greg!

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

    Thanks so much for such a helpful video! Would you mind making a video on how to make different types of plots in R?

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

    5 min studying R used to blow off my mind, but now i actually enjoy R

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

    Wow! Thank you so much. This has really helped me in my undergraduate studies :) I really appreciate it!!!

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

    You are amazing! 👏🏻👏🏻👏🏻👏🏻 Thanks for that. New subscriber here.

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

    Very nice. Thanks -

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

    Do more man, these videos are really good

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

    Love this video! thanks

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

    Very useful, thanks!

  • @lol-cf7ec
    @lol-cf7ec 3 года назад +1

    I recently started university and these videos are really really helpful!! Thank you☺️

  • @vrajtalati5300
    @vrajtalati5300 9 месяцев назад

    Can you please make a video on joints and how to perform them in R because your explanation is outstanding, I must say! Please make a video on combining two tables with left join.

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

    Boom shakalaka!! 🤣🤣🤣🤣New here and loving your contents

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

    Wow, the NEAR function is very interesting. I was wondering how I could have R 'scan' a huge set of standard deviation values and determine those whos mean & medians stray out of a tolerance. 👍

  • @alexandrosagloumis3487
    @alexandrosagloumis3487 4 года назад +1

    Good job my friend!!!

  • @steves511
    @steves511 4 года назад +3

    Gosh you are good at explaining this, thanks a bunch. Can you tell me what theme you use for Rstudio, really digging it!

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

      Looks like "Chaos" to me

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

    I just discovered your channel and I'm finding it not nearly as impossible to get myhead around R using Tidyverse. A challenge that I am having is filtering a dataset on year. I want to keep the last ten years of data. I don't have the vocabulary to dynamically filter. Ideally, if a new year is added to my dataset, then the last year will be dropped and the new year will be added to the analyses. Do you have any suggestions on how to filter when the values in the year column is unknown but I want the most recent ten?

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

    Bro you're saving lifes

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

    Great video!! What theme are you using in R studio?? Colors are very nice

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

    Brilliant. You should have a faculty position at a University.

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

    Thanks for the video, we can also use multiple filter clause
    my_data %
    select (name, sleep_total) %>%
    filter (name %in% c("Cow", "Dog", "Horse") |
    between(sleep_total, 16,18))

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

    Hi, Greg. About your coding style, are the white spaces between arguments and symbols created automatically or you set style after coding? Many thanks.

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

    Superb video sir. Thank you so much
    But I'm stuck at how we can apply loop in filter function so that it can filter one thing and make a file and then filter next and make next file and so on. Please give solution sir!!!

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

    Amazing content for learning R, thank you so much. Just a qq - is there an example of using a filter function with starts_with, ends_with, contains functions? Similar to how those functions are combined with the select function?

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

      using stringr library, filter(df, str_detect(species, "^D")) , where ^D means starts with D
      credits to @weecology

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

      Good one. I am sure it there, filtering based on wildcard

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

    I love your videos, for some reason "my_data

  • @rjluciano
    @rjluciano 4 года назад +1

    I am interested in learning how to weight data in R. Greg Martin, is there any chance you will cover data weighting in the future? (By the way I abbreviated my RUclips name to the first letter of my first name, Rob. That was unconnected to the fact I have taken an interest in learning R programming)

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

      Thanks for the comment Rob. Yes, I’ll create a video on data weighting for sure. Thanks for the suggestion.

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

    How can we export the results in for Use in presentation or the likes

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

    In this example, if I wanted to filter for all observations with a name 'containing' the letters "ow" , how would that be possible?

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

    sir how can we filter the values of coordinate pairs in loop.

  • @wyclifeoluoch9376
    @wyclifeoluoch9376 4 года назад +1

    Good job Greg,
    Am surprised when you used:
    filter(name %in% c("Cow", "Dog", "Horse")
    The output:
    Cow
    Dog
    Goat
    How did "Horse" change to "Goat" ?

    • @RProgramming101
      @RProgramming101  4 года назад +1

      Ooooih!!! Well spotted!!! It was a post production editing mistake. I didn’t see it until now (blush)

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

    how to get the "or" symbol ?
    thank you

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

    Very good video. I have noticed that you can't use a variable in filter () that is not included in the select() part. For example:
    mydata%
    select(name, order, bodywt, sleep_total) %>%
    filter(is.na(conservation))
    gives an error
    Errore: Problem with `filter()` input `..1`.
    x oggetto "conservation" non trovato
    i Input `..1` is `is.na(conservation)`.
    In sql you can filter for a variable even if itìs not included in the select clasue. It's strange.

    • @RProgramming101
      @RProgramming101  3 года назад +3

      Thanks for the comment Marco - what you can do is filter before the select (if you want to). Once you've used the select function in R, the dataset that you're using is changed and narrowed to only include those variables that you have selected.

  • @gibroni94
    @gibroni94 3 месяца назад

    I love you

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

    A Horse is a Goat!

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

    Thank….I have a question…How can I change the coulers of some sign like () or%>% like yours? Where is the setting the window of R?

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

      With R studio open, Click on the "tools" tab and select "Global options". Then look for "Appearence" on the left hand side and click on it. Under the "Editor theme" option there is a wide range of themes to choose from. When you find one you like click on "Apply".

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

      Thanks Theolan, for sharing your knowledge...I did it, and now I have a beautiful window in R Studio!

  • @markviya2194
    @markviya2194 11 месяцев назад

    How to filter from a column only in english cos i got many texts in multiple languages

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

    I get this error when filtering: unexpected input in "filter(year > 1995, country %in% c(“"

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

    I don’t know why when I typed:
    my_data %
    select (name, sleep_total) %>%
    filter (name == “Cow”|
    name == “Dog”|
    name == “Goat”)
    I have to type again my_data to see the result
    Also Appear two results Cow and Goat
    Why not appears Dog’s result?

  • @orhanyork
    @orhanyork 4 года назад +1

    Boom shaka laka :)

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

    Boom shakalaka😂😂😂😂😂😂

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

    Thank you for the video..
    Is this correct? sorry my first time doing this
    nv %

    na.omit() %>%
    group_by(vore) %>%
    summarise(av_awake = mean(awake), av_sleep_total = mean(sleep_total)) %>%
    arrange(av_awake, av_sleep_total) %>%
    select(vore, av_awake, av_sleep_total )

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

    boooom booom shaka laka

  • @Life-colours
    @Life-colours 2 месяца назад

    Please don't use the unfriendly sound while selecting or underlying something. It feels worst if someone has Hemdchens on.