No video

Clean your data with R. R programming for beginners.

  Рет қаралды 140,458

R Programming 101

R Programming 101

2 жыл бұрын

If you are a R programming beginner, this video is for you. In it Dr Greg Martin shows you in a step by step manner how to clean you dataset before doing any additional analysis. This is part of a series that considers exploring data, cleaning data, manipulating (or wrangling) data, describing data, visualizing data and finally, analyzing data. The tutorial uses data built into R so you can replicate the work on your computer at home. Dr Martin uses the Tidyverse packages that allows for additional functions like select, filter, mutate etc. This tutorial also deals with missing data. So if you are a data scientist, or interested in quantitative analysis or research, this this is a good video to start with.

Пікірлер: 160
@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
@ezeadorchikaogochukwu5697
@ezeadorchikaogochukwu5697 Жыл бұрын
Great lesson, thanks
@GFXHDTV
@GFXHDTV 4 ай бұрын
00:01 Cleaning your data involves systematic exploration, cleaning, manipulation, visualization, and analysis. 01:44 Installing packages in R expands functionality. 05:31 Converting character variable to factor variable in R 07:31 Using the factor function to swap levels in R 11:11 Understanding the difference between 'or' and 'and' in filtering data. 13:03 Handling missing data is crucial for accurate analysis. 17:02 Understanding how to handle missing values in data sets is crucial for data cleaning in R. 18:49 Handle missing data with nuanced approach, not just sweeping deletion 22:16 Identify and handle duplicates in data frames 24:04 Selecting and filtering data using base R method
@harrisonnash4948
@harrisonnash4948 2 жыл бұрын
Life saver using this vidoe in a last min dash to finish some coursework
@RProgramming101
@RProgramming101 2 жыл бұрын
Thanks for the feedback Harrison. Glad I could help.
@max5916
@max5916 2 жыл бұрын
We really appreciate your best KZfaq channel for learning R we looking forward to see more especially for survival analysis, parametric and non parametric tests
@RProgramming101
@RProgramming101 2 жыл бұрын
Wow, thank you!
@johnrussell5715
@johnrussell5715 2 жыл бұрын
I do love your enthusiasm Greg, it really keeps me interested in watching through to the end!
@RProgramming101
@RProgramming101 2 жыл бұрын
Thanks John - much appreciated!
@nonoobott8602
@nonoobott8602 2 жыл бұрын
Your tutorials are unarguably the most explicit and practical for the use of R. Beyond using R as a tool, you explain a lot of statistical concepts. Thanks for all you do, I've learned a lot from your channel
@Shawn-gm4cf
@Shawn-gm4cf 2 жыл бұрын
Honestly love all your videos. Detailed explanation and yet simple and straightforward. Keep up the great work.
@domyndegeya7760
@domyndegeya7760 Жыл бұрын
Thank you so much Dr Martin. As a beginner , the way you explain the R programming makes me loving that language more and easy to deal with coding. Keep up with more great videos.
@RProgramming101
@RProgramming101 Жыл бұрын
Thank you for the feedback. Glad you enjoyed it! You got this!
@antonreinhold8478
@antonreinhold8478 2 жыл бұрын
Thank you so much, you're such a huge help! I dont think i would pass my 'digital data analysis' course without your channel
@RProgramming101
@RProgramming101 2 жыл бұрын
Happy to help!
@user-bn4hd1qh4c
@user-bn4hd1qh4c Жыл бұрын
Incredible channel, the material is better than any course I have paid for. The delivery and the breakdown of topics into separate videos are perfect for learning. Thank you for sharing your expertise and time.
@GallantDanny
@GallantDanny Жыл бұрын
Excellent! Thanks for putting out such great content that's not only useful, but easy to follow!
@RProgramming101
@RProgramming101 Жыл бұрын
Wow - what a nice thing to say (thanks!!)
@deniseortiz8567
@deniseortiz8567 Жыл бұрын
Out of all the online classes and videos I have done, I WISH I STARTED WITH THIS ONE!! Thank you!
@RProgramming101
@RProgramming101 Жыл бұрын
Glad it was helpful! Thanks for your amazing feedback
@phillippin6699
@phillippin6699 8 ай бұрын
I don't usually comment, but this man here is the best I've come across on youtube,. Damn, too good
@AlexKashie
@AlexKashie 9 ай бұрын
I am here for the "super duper easy"... Keep up the great work Dr, thnaks.
@danquixote6072
@danquixote6072 2 жыл бұрын
Very useful thank you - especially the section on NAs and recoding. Also appreciate the editing, effects, sound quality and close ups of the code. I’ve recently been using the star wars database for my English teaching lessons to help students with the interrogative. How tall is R2D2? How much does Darth Vader weigh? Etc. One request if possible - Times, Dates and TimeDates. Thank you again, your videos have been very helpful.
@HiltonT69
@HiltonT69 2 жыл бұрын
Very clear, useful and interesting. I'm just getting into R and this helped me understand how it can be used for sensible data cleaning.
@RProgramming101
@RProgramming101 2 жыл бұрын
Great to hear! Thanks for watching!
@folashadeolaitan6222
@folashadeolaitan6222 Жыл бұрын
You are an awesome teacher. I want to give you a hug right now! 😊Thank you for making it so easy to foloow through.
@Sorjen108
@Sorjen108 9 ай бұрын
Easy, Peasy, Lemon Squeezy! Best R Programming Channel Keep it going!
@elenag.224
@elenag.224 2 жыл бұрын
You really make programming seem "easy-peasy lemon squeezy", keep it up!
@RProgramming101
@RProgramming101 Жыл бұрын
Thanks for watching!!! I appreciate your feedback!
@summer7361
@summer7361 Жыл бұрын
You sir have an incredible voice for teaching. Glad I found your channel
@RProgramming101
@RProgramming101 Жыл бұрын
Glad to hear it! Thank you!
@yamimartina
@yamimartina 2 жыл бұрын
Hi there, Greg! Thanks a lot for these videos, love your style. I've learned A LOT!
@RProgramming101
@RProgramming101 2 жыл бұрын
Great to hear, Yamila! Thank you for the feedback!
@elliebrown7694
@elliebrown7694 2 жыл бұрын
Thank you so much for creating so much accessible and engaging content. For a beginner the way you teach is very clear and easy to understand and your passion for R has made me love it even more! (I also appreciate being hyped up for learning by some drum and bass in the intro)
@jerryeyong5585
@jerryeyong5585 3 ай бұрын
Excellent lectures and a good lecturer also
@KarstenDrKempf
@KarstenDrKempf 2 жыл бұрын
Very helpful. the perfect mixture between the background ideas ( what data to dismiss) and the R way to do so. Hope to see more videos. Enjoy X-mas
@melinaguillon2449
@melinaguillon2449 2 ай бұрын
You're amazing at teaching this. Thank you!
@RProgramming101
@RProgramming101 2 ай бұрын
you are most welcome melina.
@yidanjiang7599
@yidanjiang7599 2 жыл бұрын
Truly helpful! Amazing video for tidyverse
@RProgramming101
@RProgramming101 2 жыл бұрын
Glad it was helpful!
@itsmitasha
@itsmitasha Ай бұрын
Amazing tutorial!! Thank you so much! ⭐️⭐️⭐️⭐️⭐️
@IarukaSkYouk
@IarukaSkYouk Жыл бұрын
oh my god man you are a godsent!!!! I've been learning R in the google data course from Coursera and they don't teach much.
@annleonard9713
@annleonard9713 2 жыл бұрын
This is brilliant, I am on my third video and I am amazed at how easy this is made to seem👏
@vivicaanuforo4754
@vivicaanuforo4754 Жыл бұрын
YOU ARE SUCH A GOOD TEACHER... THANK YOU
@emiliezeuthen7631
@emiliezeuthen7631 2 жыл бұрын
Very useful Greg, such a big help for at R-n00b
@raulpalomares1092
@raulpalomares1092 2 жыл бұрын
You're a hell of a teacher! congrats!!
@MaltePeter
@MaltePeter 2 жыл бұрын
Such good videos for learning R programming and such a nice series. When is the next episode about manipulating your data comming out? Can't wait for it!
@RProgramming101
@RProgramming101 2 жыл бұрын
haha - any day now... (perhaps tonight)
@Researcholigist
@Researcholigist 2 ай бұрын
Thank you so much for the great and useful videos
@goon5031
@goon5031 2 жыл бұрын
Love this. I didn't know there was an in-house R dataset for star wars.
@RProgramming101
@RProgramming101 2 жыл бұрын
Yeah - I love it!
@shaikhahmedbd
@shaikhahmedbd Жыл бұрын
Thank you so much! love all your videos! simple and straightforward! with detailed explanation.
@RProgramming101
@RProgramming101 Жыл бұрын
I'm so glad to have you as a subscriber! Thank you for being a part of this community.
@iblisthemage
@iblisthemage 3 ай бұрын
Great content. Recode is superseded… we need a new video on this topic 🙂
@felipecruz3061
@felipecruz3061 Жыл бұрын
You channel is a life saver man. Thank you
@Junecode
@Junecode 3 ай бұрын
Thanks for the lessons so far. Love it
@Aaqib..
@Aaqib.. 2 жыл бұрын
Thanks a lot sir. I can't be grateful enough for your videos
@samikzr
@samikzr 2 жыл бұрын
Much appreciated. Amazing skills in such a simplified way thank you.
@RProgramming101
@RProgramming101 Жыл бұрын
Glad it was helpful! Thanks!
@lets_code_this2678
@lets_code_this2678 Жыл бұрын
Yo you arer the best programing youtube chanel bro
@RProgramming101
@RProgramming101 Жыл бұрын
Wow I appreciate the kind words. Your support encourages me to create more content that you'll enjoy! Thank you
@altareq24953
@altareq24953 9 ай бұрын
best practice lecture for R
@anujakori
@anujakori 3 ай бұрын
Thank you so much. Your videos are very helpful.
@RProgramming101
@RProgramming101 3 ай бұрын
Glad you like them!
@kamogelokhumalo4792
@kamogelokhumalo4792 2 жыл бұрын
Thank you very much Sir. This was quite easy to understand as a beginner. Would you kindly maybe make a series of these videos for us beginners because you have many videos and we wouldn't know which video to watch after this one. I hope that makes sense. Anyway thank you a lot for these videos
@RProgramming101
@RProgramming101 2 жыл бұрын
I will try my best
@TaraGhimite
@TaraGhimite Жыл бұрын
Thank you, Dr Martin
@raulpalomares1092
@raulpalomares1092 2 жыл бұрын
Thumbs up for you Greg!
@pipertripp
@pipertripp 2 жыл бұрын
Just a heads up to everyone, at the end of the vid when you're doing the recode bit, you might hit this error: Error: Problem with `mutate()` column `gender`. i `gender = recode(gender, masculine = 1, feminine = 2)`. x unused arguments (masculine = 1, feminine = 2) if you get this error, force R to use dplyr's version of recode like this: starwars %>% select(name, gender) %>% mutate(gender_coded = dplyr::recode(gender, "masculine"=1, "feminine"=2)) I'm not sure why I had to do this, as I had already run the library(tidyverse) command, but replacing recode with dplyr::recode sorted it out.
@pipertripp
@pipertripp 2 жыл бұрын
Figured it out. I also have the "car" package (for the Variation Inflation Factor function "vif" that I'm also using) in my project and so there was a name collision and it was taking recode from car (Comparison to Applied Regression) rather than from dplyr.
@krono32
@krono32 Ай бұрын
Very helpful! Thank you, sir!:D
@RProgramming101
@RProgramming101 Ай бұрын
Glad it was helpful!
@DrJohnnyJ
@DrJohnnyJ 2 жыл бұрын
I can't get the line to work: filter(hair_color %in% c(“blond”, “brown”) & height < 180) Error: unexpected symbol in " filter(hair_color c" > height < 180)
@sharmeenchowdhury8306
@sharmeenchowdhury8306 Жыл бұрын
same here, showing ERROR in 'filter()'
@diddysysavane6006
@diddysysavane6006 9 ай бұрын
For the replace NA, it just filter the dataset but it doesn't change anything from the dataset. So the dataset remained not cleaned.
@yulinliu850
@yulinliu850 2 жыл бұрын
Thanks a lot!
@RProgramming101
@RProgramming101 2 жыл бұрын
You're welcome!
@erpampa94
@erpampa94 Жыл бұрын
this tutorial is Excellent! thank you!
@RosatiSamuel
@RosatiSamuel 4 ай бұрын
GREAT VIDEO
@mayanksrivastava7540
@mayanksrivastava7540 24 күн бұрын
i dont know why when i am running the complete cases code , it is showing error that " . " object is not found . Please help sir starwars|> select(name,gender,hair_color,height)|> filter(!complete.cases(.)) I ran this code
@Lin-pj5bo
@Lin-pj5bo 2 жыл бұрын
Thank you very very very much!! Really appreciate your wonderful video. 👍👍👍
@RProgramming101
@RProgramming101 2 жыл бұрын
You are very welcome. Glad you enjoyed it!
@fenysnake
@fenysnake Жыл бұрын
Warning in install.packages("tidyverse") : 'lib = "C:/Program Files/R/R-4.2.3/library"' is not writable Error in install.packages("tidyverse") : unable to install packages do you have any insight why I get this message? I'm starting with R for a statistics class and I see you recommend this package? my laptop is archaic...
@sagarlokare5269
@sagarlokare5269 Жыл бұрын
Bravo, this content was very good
@solafajobi
@solafajobi Жыл бұрын
Thank you for this. Very helpful.
@RProgramming101
@RProgramming101 Жыл бұрын
You're very welcome! Glad it was helpful.
@kamaboko1
@kamaboko1 4 ай бұрын
Solid tut. Thank you.
@adrianareitano3
@adrianareitano3 2 жыл бұрын
Hi, Love your videos they are so helpful. Could you do a video on loops in r ?? Thanks!
@RProgramming101
@RProgramming101 2 жыл бұрын
Thanks for the suggestion. Will do.
@chizfoodiehub3444
@chizfoodiehub3444 Жыл бұрын
What if the integer was a chr data type and you want to change it to an integer or double
@spraypaul
@spraypaul Жыл бұрын
You probably mention that you are looking at the whole observation for Duplicates - but I was merrily making my own example vector with a duplicate name, however with different ages. Took me a while to realise to use below to get the same as you: friends[!duplicated(friends$Names) , ] or friends %>% distinct(Names) Great content 🙏
@spraypaul
@spraypaul Жыл бұрын
of course they wouldn't be true duplicates in my vector....
@findthetruth3021
@findthetruth3021 2 жыл бұрын
Thank you so much, you're such a great help! please show us how to create Dashboards via Shiny. Thanks a lot.
@riptideking
@riptideking 2 жыл бұрын
Thank you for the video sir
@RProgramming101
@RProgramming101 2 жыл бұрын
Most welcome! Thanks for watching.
@rnarith855
@rnarith855 2 жыл бұрын
Appreciate your helpful videos
@RProgramming101
@RProgramming101 2 жыл бұрын
Happy to help! Thank you.
@tarkanh2519
@tarkanh2519 Жыл бұрын
Perfect lecture ! benefited a lot.
@RProgramming101
@RProgramming101 Жыл бұрын
Glad it was helpful! Thank you :)
@b5lovermore
@b5lovermore Жыл бұрын
When you start to explain how to find complete and incomplete cases at 16:09, what do you do if you want to find incomplete cases for the entire dataset? Would you just omit the "select" portion of the code?
@lauramagangfopossi1770
@lauramagangfopossi1770 Жыл бұрын
thanks . I've really appreciate your video
@RProgramming101
@RProgramming101 Жыл бұрын
You are welcome! Thank you!
@jamesleleji6984
@jamesleleji6984 Жыл бұрын
How can you convert data type using mutate in dplyr?
@peterscheerer2346
@peterscheerer2346 11 ай бұрын
Can anybody help me with how to disaggregate data that exists in the same column? i.e. in this example lets say you wanted to have a second column(or new variable) for secondary hair color for those values which contain a primary then a secondary hair color i.e "brown, grey", "auburn, white" etc. I am actually working on a file which contains addresses and in many cases the apartment number is not actually separated into another column. However, it should be for the import into the database I am working on and therefore I want to try to create logic to clean and disaggregate these pieces into separate columns. Any help would be greatly appreciated.
@noahsalazar2738
@noahsalazar2738 2 жыл бұрын
You Sir, are a legend!
@GracieJiuJitsu1015
@GracieJiuJitsu1015 Жыл бұрын
I'm having a problem where I want to mutate two variables with values 0, 1 and NA into a new variable with the sum of 0 and 1, however, R in my case counts NA as 0. Are there an easy fix to this, to exclude the NA?
@user-il8mt2wz9t
@user-il8mt2wz9t 10 ай бұрын
Really excellent PT. Then how R is associated with Python algorithm?
@nabilafandih
@nabilafandih Жыл бұрын
variable types select and filter find and deal with missing data find and deal with duplicates recode values
@krazitired
@krazitired 7 ай бұрын
Thank you for this amazing resource. Very helpful for someone like myself who is learning R without any meaningful stats experience aside from a semester at uni. Is anyone learning along able to share their experience of using the mutate and recode functions. I haven't had any success using this whilst following along with this video and a previous one when trying to recode the gender to M and F, or 1 and 2. I've had to work around using : starwars %>% select(name,gender) %>% mutate(gender=if_else(gender=="masculine", "1", "2")) But I'd really like to know what I'm doing wrong using recode as I think my code looks the same as Greg's! starwars %>% select(name,gender) %>% mutate(gender=recode(gender, "masculine"=1, "feminine"=2))
@user-pu9ll7vd5m
@user-pu9ll7vd5m 4 ай бұрын
Excellente~! Thanks -
@kamekaze997
@kamekaze997 Жыл бұрын
Love your videos, man - they're clear and concise, easy to follow! Would you be open to creating content based on the Google Data Analytics Cert? One of the case studies they have is about a fictional bike study called Cyclistic. And there is only one person on YT who does it in an R (Caribou Data Science) but it's not as seamless or clear as you make your videos out to be! :)
@shafeen1058
@shafeen1058 Жыл бұрын
You explained it thoroughly ❤❤
@RProgramming101
@RProgramming101 Жыл бұрын
Glad it was helpful!
@MrDarkplace22
@MrDarkplace22 2 жыл бұрын
Just curious is there any reason why you haven't enabled coloured brackets as per the last update it would make the code easier to read
@marianam5181
@marianam5181 6 ай бұрын
Thank you!! 👑
@reecebinx4191
@reecebinx4191 11 ай бұрын
I'm a newbie to r, is there a open community where people can help you with your work
@haraldurkarlsson1147
@haraldurkarlsson1147 2 жыл бұрын
Doc Martin! As usual an excellent video! I have one question regarding the recoding. In case of binary cases is it not typical to do 0 and 1 in order to be able to some stats on the data? Thanks and Happy Holidays!
@BloomingtonFPV
@BloomingtonFPV 2 жыл бұрын
If you are here from Tom's Bayesian stats class, give this video a thumbs up!
@mwegankanda6594
@mwegankanda6594 9 ай бұрын
nobody seemed to be. But here's a thumbs up (I'm here cause of stats class too lol)
@crazyytha
@crazyytha 10 ай бұрын
Thanks so much for the engaging yet very useful video! Can i ask why the following chunk of code is not able to recode missing value to the assigned value? starwars %>% select(name, gender) %>% mutate(gender2= if_else(gender=="masculine",1,if_else(is.na(gender),3,2))). Thanks a lot in advancE!
@citizenhk1040
@citizenhk1040 Жыл бұрын
Thank you very much! Very helpful
@RProgramming101
@RProgramming101 Жыл бұрын
Glad it helped! Thanks for watching!
@mercywaithira3240onlinemaths
@mercywaithira3240onlinemaths 2 жыл бұрын
And how do you undo a command that you had already executed?
@robsonreis76
@robsonreis76 2 жыл бұрын
Pretty handy tips
@RProgramming101
@RProgramming101 2 жыл бұрын
Glad you think so!
@microbemike9693
@microbemike9693 2 жыл бұрын
How come I am just discovering this channel?
@amandihiyare1184
@amandihiyare1184 2 жыл бұрын
Could you do a video on data management using R please
@nitamaitra2921
@nitamaitra2921 2 жыл бұрын
what is the difference between a data frame and a tibble
@davidispiryan5689
@davidispiryan5689 Жыл бұрын
Hello Sir, can you please make a video about pachage shiny on medical data ? Thanks a lot, great videos !!
@dollysiharath4205
@dollysiharath4205 Жыл бұрын
Thank you!
@RProgramming101
@RProgramming101 Жыл бұрын
You're welcome!
@namatovufaridah3420
@namatovufaridah3420 Жыл бұрын
Thanks a lot.
@RProgramming101
@RProgramming101 Жыл бұрын
Most welcome!
@eyadha1
@eyadha1 Жыл бұрын
great! thank you very much
@RProgramming101
@RProgramming101 Жыл бұрын
Thanks for the great feedback- Much appreciated !!
@juliablazy4011
@juliablazy4011 Жыл бұрын
super thanks
@congz5101
@congz5101 2 жыл бұрын
Thank you so much!
@sriram7845
@sriram7845 5 ай бұрын
Never thought Jason Statham is an "R" Expert
@SuccessGossips
@SuccessGossips 9 ай бұрын
love it
@dadan.dahman.w
@dadan.dahman.w 2 жыл бұрын
Hello can you make playlist about OOP in R ?
Manipulate your data.   Data wrangling.   R programmning for beginners.
29:59
R Programming 101
Рет қаралды 75 М.
Explore your data using R programming
25:39
R Programming 101
Рет қаралды 101 М.
Son ❤️ #shorts by Leisi Show
00:41
Leisi Show
Рет қаралды 10 МЛН
WORLD'S SHORTEST WOMAN
00:58
Stokes Twins
Рет қаралды 180 МЛН
Data wrangling with R in 27 minutes
27:19
Equitable Equations
Рет қаралды 21 М.
This is how I actually clean data using Power Query
27:49
Mo Chen
Рет қаралды 25 М.
R vs Python
7:07
IBM Technology
Рет қаралды 317 М.
🚨 YOU'RE VISUALIZING YOUR DATA WRONG. And Here's Why...
17:11
Adam Finer - Learn BI Online
Рет қаралды 60 М.
Cleaning Data in Excel | Excel Tutorials for Beginners
21:04
Alex The Analyst
Рет қаралды 523 М.
Describe and Summarise your data
19:44
R Programming 101
Рет қаралды 52 М.
R Programming for Beginners | Complete Tutorial | R & RStudio
49:45
Dynamic Data Script
Рет қаралды 711 М.
R Markdown TUTORIAL | A powerful tool for LEARNING R (IN 45 MINUTES)
45:22