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.

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

  • @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

  • @gregmartin
    @gregmartin 5 лет назад +44

    Making sure that all of your variables are identified as the right type of data is the first step in data analysis.

    • @sajidsajy
      @sajidsajy 5 лет назад +1

      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. ❤️

    • @ens2422
      @ens2422 5 лет назад

      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

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

      @@ens2422 .

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

      Excellent Greg! Each of your videos is a gem!!

  • @zachjones8428
    @zachjones8428 11 месяцев назад +3

    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!

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

    This is literally the BEST R instruction I have found so far. Period.

  • @mziegl11
    @mziegl11 Год назад +3

    This is code for a data frame I made to practice with:
    name

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

    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.

  • @ness1992
    @ness1992 5 лет назад +25

    This series is amazing, can't wait for the next videos. Keep up the great work!

    • @RProgramming101
      @RProgramming101  5 лет назад +2

      WOW - thanks for the feedback Vanessa!! I really appreciate it. More videos to come soon (for sure). :)

  • @akask6458
    @akask6458 5 лет назад

    I am impressed. Please keep on making these videos. You explain the concepts clearly and efficiently.

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

    More videos man! Kudos to a great work, you make the fundamentals easy to learn and fun.

  • @ivanchenkow
    @ivanchenkow 5 лет назад +2

    Thank you a LOT! Hope you are going to continue this great project ☺️

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

    This guy is great at teaching R learned so much really quickly.

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

    Love the way you present and explain thing. Appreciate it!

  • @gabrielbessa2575
    @gabrielbessa2575 5 лет назад +4

    Keep on posting, the videos are great !

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

    just starting off with the journey...loved your videos...thanks for posting!!

  • @intekhabalam4206
    @intekhabalam4206 5 лет назад +2

    Thank You. You are amazing. I hope you'll keep on this project

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

    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.

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

    Your videos are very useful for beginners. Thanks, mate

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

    excellent. got a bit stuck with using lower case when upper case needed for variable names, but very clear and a great explanation

  • @Sefirola
    @Sefirola 5 лет назад +3

    Good work Greg! Cant waite to see next video in the series!

    • @RProgramming101
      @RProgramming101  5 лет назад +1

      Thanks Cristian. I have a few videos in the pipeline. Please feel free to send any requests too

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

    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 :)

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

    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?

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

    Great Video, Colourful and informative.

  • @kumarant6411
    @kumarant6411 4 года назад +5

    Hello Sir, Amazing. When could we see the upcoming videos. We are eagerly waiting. Please

  • @just.gocycling
    @just.gocycling 5 лет назад +3

    Great! Can't wait for the next videos :)

    • @RProgramming101
      @RProgramming101  5 лет назад

      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.

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

    This is so awesome and has allowed me to take my own personal steps on analysing my own data.

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

    Good tutorials, did fine, thank you.

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

    thank you so much, very clear, to it makes me understand it

  • @fysalo.graphy
    @fysalo.graphy 4 года назад

    hey, i am eagerly waiting for your next video, plz post it as soon as possible.

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

    Excellent!

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

    Amazing... i was in a struggle for some hours about the data type. You solve that for me.... Thank Youuuu

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

    We want more, we want more!

  • @samiramerah525
    @samiramerah525 7 месяцев назад

    really it's fantastic

  • @siqiduan1448
    @siqiduan1448 5 лет назад +8

    Love these tutorials! When is the new video coming out?

  • @c.rafatulkabir6971
    @c.rafatulkabir6971 2 года назад

    you are amazing!

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

    Thank you sir ❤️

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

    that's great for Start

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

    Very helpful and easy to learn. Thank you!

  • @ayoadeoriola34
    @ayoadeoriola34 5 лет назад +2

    Thank you so much for this.

    • @RProgramming101
      @RProgramming101  5 лет назад

      You are most welcome Ayoade. Glad you liked it. More to come (very soon). :)

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

    Great help for me, thank you very very much

  • @studentofeconomics.7841
    @studentofeconomics.7841 2 года назад

    your are an amazing instructor.

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

      I appreciate that! Thank you for your kind feedback!

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

    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?

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

    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?

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

    It worked great! Although it took ~30 min (25 min for re-installing R, lol)

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

    thanks for the video! Is there another way to use "select" without column names?

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

    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

  • @funkbro01
    @funkbro01 7 месяцев назад

    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?

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

    Very impressive and amazing thank you

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

    Thanks

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

    Thanks -

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

    is it possible to share the datasets that you have used outside those included in tidyverse? thanks

  • @carolina.clemens1842
    @carolina.clemens1842 Год назад

    I am following your videos now, they are super clear and easy! Are you still doing them?

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

      Yes of course! I'm so glad to have you as a subscriber! Thank you for being a part of this community.

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

    Amazing video. Please can you provide friends data for practice?

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

      Will try to - and will use built in data sets from now on .

  • @healthdepartmentdevbhumidw8800

    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) ?

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

    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

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

      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.

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

    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

  • @pavloszournatzidis
    @pavloszournatzidis 7 дней назад

    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?

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

    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.

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

    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?

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

    Very helpful video but I have a ton of questions still...

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

    can you share the excel/.csv file as well?

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

    Where do i get the dataset from?

  • @yaweli2968
    @yaweli2968 4 месяца назад

    Where can I find the friends dataset?

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

    Sir your tutorials are amazing.. sir kindly speak slowly

  • @THYPLAYER01
    @THYPLAYER01 4 месяца назад

    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.

  • @MrAdityabhatia
    @MrAdityabhatia 5 лет назад

    Hey,
    When is the next video releasing?

  • @tvvt005
    @tvvt005 6 месяцев назад

    What is the difference between str() and class ()?

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

    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

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

      You can try mine too. The channel's playlist for Python and R provide most of the fundamentals.

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

    how we can upload this friends data set?

  • @ens2422
    @ens2422 5 лет назад

    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

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

      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 ...

  • @sashacastel-branco8322
    @sashacastel-branco8322 2 года назад

    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?

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

      Hi Sasha - try the function "View()" - hope that helps. Thanks for the feedback.

    • @sashacastel-branco8322
      @sashacastel-branco8322 2 года назад

      @@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?

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

    What if age is in decimals?

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

    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 ?

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

      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)

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

    When will you be posting a new video???

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

    is there any way you can post the data along side your videos its great to fallow along with you

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

      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.

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

      hope this was helpful

  • @mugerwahamudane7449
    @mugerwahamudane7449 5 лет назад

    could you please tell me what C stands for. thank you

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

    I'm always struggling to get the difference between data type & class. Anyone could Eli5 for me

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

    super good tutorial but bmi is not a good indicator of health!

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

    7:16

  • @nathantang9964
    @nathantang9964 5 лет назад

    What's the point of downloading R if all your work is in Rstudio?, when do you actually use R?

    • @brandonsandoval7290
      @brandonsandoval7290 5 лет назад

      The analogy I was given is that R is like a car's engine and R Studio is the steering wheel and dashboard.

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

    sounds is not clear

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

    Are you South African?

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

    Old > 23
    Me at 37 🥲