Data types in R programming
HTML-код
- Опубликовано: 15 июл 2024
- In this video I provide an overview of the five main types of data used in R programming. These are character, factor, integer, continuous and logical. I show how you can look at the structure of a dataframe and change the data type for a given variable. This video forms part of the "R programming for beginners" series. If you are interested in data science or statistics, then this video is for you.
Get my FREE cheat sheets for R programming and statistics (including transcripts of these lessons) here: www.learnmore365.com/courses/rprogramming-resource-library
Making sure that all of your variables are identified as the right type of data is the first step in data analysis.
Brill. Great I ended up here on your videos. You have created a great source of learning. Really appreciate that and keep teaching 👍👍
You got a member in your fan club. ❤️
Bill......I have observed annual maxima mean temperature values for a 30 year period (1961-1990)..so i want to use R to fit/plot a gevd(generalized extreme value distribution) and also a 20 and 50 year return period for this data...how can i achieve this using R??Thanks in advance
@@ens2422 .
Excellent Greg! Each of your videos is a gem!!
I want you to know how much your videos have helped me. I keep coming back to them when I need to begin working around some of my problems with getting my data right. This information can be really hard to find the answers to navigating through the internet. So thank you for making it so clear and helpful!
This is literally the BEST R instruction I have found so far. Period.
Thanks Sanjay (much appreciated!!)
This is code for a data frame I made to practice with:
name
Fantastic tutorials! I love all of these. I've noticed how Excel can be limited at times, and these videos have been helping me transition to R.
This series is amazing, can't wait for the next videos. Keep up the great work!
WOW - thanks for the feedback Vanessa!! I really appreciate it. More videos to come soon (for sure). :)
I am impressed. Please keep on making these videos. You explain the concepts clearly and efficiently.
More videos man! Kudos to a great work, you make the fundamentals easy to learn and fun.
Thank you a LOT! Hope you are going to continue this great project ☺️
This guy is great at teaching R learned so much really quickly.
Love the way you present and explain thing. Appreciate it!
Keep on posting, the videos are great !
just starting off with the journey...loved your videos...thanks for posting!!
Thank You. You are amazing. I hope you'll keep on this project
Muy buen video, me encanto aprendi bastante me gusta r por la programacion no tanto por la estadistica, lo dificil es encontrar videos que expliquen con detalles la programacion.
Your videos are very useful for beginners. Thanks, mate
excellent. got a bit stuck with using lower case when upper case needed for variable names, but very clear and a great explanation
Good work Greg! Cant waite to see next video in the series!
Thanks Cristian. I have a few videos in the pipeline. Please feel free to send any requests too
I learned something new from this video which is the point of as.factor, i had difficulty with it, i didn't know it was related to ordinal data type, and thus i subscribed, i'm looking forward to explore your channel :)
Hi, I really love your video! It is the only video about R I found so far, which is understandable for a beginner like me. Thanks so much! Hope there will be more training videos soon?
Great Video, Colourful and informative.
Hello Sir, Amazing. When could we see the upcoming videos. We are eagerly waiting. Please
Great! Can't wait for the next videos :)
Thanks Jonas!!! More to come for sure. Please feel free to send any special requests (re video topics) and I'll try to make them.
This is so awesome and has allowed me to take my own personal steps on analysing my own data.
good to hear it!! Thanks for the feedback
Good tutorials, did fine, thank you.
thank you so much, very clear, to it makes me understand it
hey, i am eagerly waiting for your next video, plz post it as soon as possible.
Excellent!
Amazing... i was in a struggle for some hours about the data type. You solve that for me.... Thank Youuuu
Glad it helped! Most welcome.
We want more, we want more!
really it's fantastic
Love these tutorials! When is the new video coming out?
you are amazing!
Thank you sir ❤️
that's great for Start
Very helpful and easy to learn. Thank you!
Thank you for the feedback!
Thank you so much for this.
You are most welcome Ayoade. Glad you liked it. More to come (very soon). :)
Great help for me, thank you very very much
You are welcome!
your are an amazing instructor.
I appreciate that! Thank you for your kind feedback!
5:12 what difference will the levels argument make here? I heard that we might want to use the ordered = TRUE argument if it is nominal data but without the ordered argument, is there a point to the levels argument?
Hi there
Your videos are amazing. Because I am new in R sometimes I get lost. From where di you get the object "Friends" for doing this practice?
It worked great! Although it took ~30 min (25 min for re-installing R, lol)
thanks for the video! Is there another way to use "select" without column names?
Hi Greg,
I really enjoy your youtube channel here.
One question though: how about converting chr types into pur date type? Tried to find solutions in the web but didnt succeed.
Regards,
Janni
Great video series. Keep up the good work. I can't seem to find the raw data anywhere. Is there a link somewhere? Are people just creating their own "friends" data by copying it by hand into excel?
Very impressive and amazing thank you
Glad you enjoyed it
Thanks
Thanks -
is it possible to share the datasets that you have used outside those included in tidyverse? thanks
I am following your videos now, they are super clear and easy! Are you still doing them?
Yes of course! I'm so glad to have you as a subscriber! Thank you for being a part of this community.
Amazing video. Please can you provide friends data for practice?
Will try to - and will use built in data sets from now on .
Good one what if i need bar chart or Pia chart for different group of BMI (Less than 18, 18 to 25, more than 25) ?
Great job with all these videos.
Wondering how R treats factor variables. I am used to assigning 0 or 1 but at times when I try to set these levels, R ignores the zero-coded values. I’ve switched to 1 and 2. But wondering if this will ultimately mess with logistic regression models moving forward
For example, let’s say I have a healthcare data set on patients with diabetes, with variables:
- DM (History of Diabetes, Factor, 0/1)
- Sex (M/F, Factor, 0/1),
- Mortality (Alive/Dead, Factor,0/1)
Should these be coded as factor or as characters given they are categorical but have no ordinal relationship?
I would like to create a bar graph with:
x= Categorical DM y/n
y=Count (n) dead
color=gender
Can't quite seem to get that to work and what I'm thinking is I would have to create another data set with DM_Alive, DM_Dead, No_DM_Alive... etc.
Sir, I have a data set containing variable "Accident Time ", it is in int type.. Please suggest to which data type I must convert them... Please
this is conveninet for 5 variables, but I have 80. When I import them from excel, not sure why but they are all recognized as numeric. So not only I have to change the type, but also the add labels. Is there any quicker way to apply as.factor on multiple variableS?
I can't figure out one thing here. When I am using na.omit() function, it is only removing the NA from columns with numeric data. One of the columns is in character format and it's not removing NA values from there.
Using the sample function in r, it returns a bunch of integers. It's not a list or a matrix or an array, what is it?
Very helpful video but I have a ton of questions still...
can you share the excel/.csv file as well?
Where do i get the dataset from?
Where can I find the friends dataset?
Sir your tutorials are amazing.. sir kindly speak slowly
Will do.
I am here because I wanna use this knowledge to be part of a PhD research team. I will be back to on this comment.
Hey,
When is the next video releasing?
What is the difference between str() and class ()?
I tried, but while calculating the BMI the answer was repeatedly "mass" not found. when I applied the same process for the other data (puromycin) it run seamlessly.
thanks
You can try mine too. The channel's playlist for Python and R provide most of the fundamentals.
how we can upload this friends data set?
Hellos, can someone help me with this...I have observed annual maxima mean temperature values for a 30 year period (1961-1990)..so i want to use R to fit/plot a gevd(generalized extreme value distribution) and also a 20 and 50 year return period for this data...how can i achieve this using R??Thanks in advance
I don't how to do it (cause I don't anything about R) but I think that if you ask in forums you will get the answer , or you can try to ask on stackoverflow.com/ or quora.com or reddit ...
hey, loved the video and it was really great but the data isn't coming up in my console when I follow all the steps! it just gives me the number of tibbles and the variables that have been selected, how can I visualise the data?
Hi Sasha - try the function "View()" - hope that helps. Thanks for the feedback.
@@RProgramming101 thank you so much for replying!! just another quick question, I'm trying to write a code that plots 2 variables against each other, is there a video on that?
What if age is in decimals?
I followed you tutorial and the last part is in trouble such as the screen here
> my_data %>%
+ select(Name,Age,Height)
Error in my_data %>% select(Name, Age, Height) : could not find function "%>%"
could you please tell me what's wrong ?
You need to go to the packages tab and check magrittr (or alternatively use the command: library(magrittr). In case it is not there, you need to install it first, use the command: install.packages(magrittr)
When will you be posting a new video???
is there any way you can post the data along side your videos its great to fallow along with you
Hey there, so sometimes if I don't have the same data set as Greg ... I use my own data set which I get online or from data I may have and apply the code he is teaching. By the time you get to this video I am sure you know how to load/import excel, csv and other types of files onto R.
hope this was helpful
could you please tell me what C stands for. thank you
concatenate function
@@sylvesternoronha9597 Thank you
I'm always struggling to get the difference between data type & class. Anyone could Eli5 for me
super good tutorial but bmi is not a good indicator of health!
7:16
What's the point of downloading R if all your work is in Rstudio?, when do you actually use R?
The analogy I was given is that R is like a car's engine and R Studio is the steering wheel and dashboard.
sounds is not clear
Are you South African?
Old > 23
Me at 37 🥲