Importing/Reading Excel data into R using RStudio (readxl) | R Tutorial 1.5b | MarinStatsLectures

Поделиться
HTML-код
  • Опубликовано: 15 июл 2024
  • Import/Read Data from Excel (both xls and xlsx formats) into R using RStudio (readxl package); Practice With Free Dataset:(bit.ly/2rOfgEJ) Learn how to Import Data from CSV & TXT Files into R: (bit.ly/2OMBdga)
    👍🏼Best Statistics & R Programming Language Tutorials: ( goo.gl/4vDQzT )
    ►► Like to support us? You can Donate (bit.ly/2CWxnP2), Share our Videos, Leave us a Comment and Give us a Thumbs up! Either way We Thank You!
    How to Import/copy/read Excel data into R using RStudio and the readxl package:
    The readxl package makes it easy to get data out of Excel and into R and clean up the data before importing, thanks to the dedicated work of those behind readxl Hadley Wickham and Jenny Bryan! (read more readxl.tidyverse.org/ )
    ▶︎ With the readxl package in RStudio you can easily import both xlsx and xls files into R from a local file or a url
    ▶︎ With this RStudio feature you can easily rename your dataset before importing data into R
    ▶︎ You can change column data types when importing data into R
    ▶︎ Using RStudio to import Excel data, you can choose which Excel worksheet to import to R
    ▶︎ In addition, you will be able to decide which rows of your Excel file to read into R and skip the first X rows
    ▶︎ We will also be able to limit the number of rows imported into R
    ▶︎ readxl package in RStudio will let you skip columns of data when importing Excel data in R
    ▶︎ There is also an option to deal with the missing values in your excel data file and select NA identifiers when importing data into R
    ▶︎▶︎ Download the Lungcap dataset here:
    statslectures.com/r-scripts-d...
    ▶︎▶︎Watch More:
    ▶︎ Import Data, Copy Data from CSV & TXT Files in to R using R Functions: bit.ly/2OMBdga
    ▶︎ Getting Started with R: bit.ly/2PkTneg
    ▶︎ Graphs and Descriptive Statistics in R: bit.ly/2PkTneg
    ▶︎ Probability distributions in R: bit.ly/2AT3wpI
    ▶︎ Bivariate analysis in R: bit.ly/2SXvcRi
    ▶︎ Linear Regression in R: bit.ly/1iytAtm
    ▶︎ Intro to Statistics Course: bit.ly/2SQOxDH
    This video is a tutorial for programming in R Statistical Software for beginners, using RStudio.
    Follow MarinStatsLectures
    Subscribe: goo.gl/4vDQzT
    website: statslectures.com
    Facebook:goo.gl/qYQavS
    Twitter:goo.gl/393AQG
    Instagram: goo.gl/fdPiDn
    Our Team:
    Content Creator: Mike Marin (B.Sc., MSc.) Senior Instructor at UBC.
    Producer and Creative Manager: Ladan Hamadani (B.Sc., BA., MPH)
    This #RTutorial is created by #marinstatslectures to support the statistics courses (SPPH400 #IntroductoryStatistics and SPPH500 Generalized Linear Models in Biostatistics) at The University of British Columbia (UBC) although we make all videos available to the everyone everywhere for free!
    Thanks for watching! Have fun and remember that statistics is almost as beautiful as a unicorn!

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

  • @marinstatlectures
    @marinstatlectures  5 лет назад +10

    The readxl package makes it easy to get data out of Excel and into R from multiple worksheets and clean up the data before importing it (like change the name, skip rows and columns, identify the type of the data, and many more useful functions), thanks to the dedicated work of those behind readxl Hadley Wickham and Jenny Bryan, my former supervisor and mentor!

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

      Thanks for the video, this is great. What about the variable names in row 3? You specified the range as "B3:E11" and the checkbox "first row as names" is checked, but it seems RStudio isn't importing row 3 as names. Is it a bug?

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

      Man you made me learn how to directly import excel data, thank you

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

      Sir ,
      there is no package called "pillar" ..
      What to do when it pops like this ???

  • @bettinathek6484
    @bettinathek6484 4 года назад +14

    wow again: how students can learn from youtube instead from there lectures!! great, thanks :-)

  • @mouhamadibrahim4269
    @mouhamadibrahim4269 11 месяцев назад +1

    I am transitioning from PhD in biomedical engineering to biomedical data analytics... I have researched for R programming channels extremely... then by chance I fortunately found your channel ! wow !!! Greatest RUclips channel so far in all ways !

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

    Yesterday, I've started to gather data from my work, and there was tons of it. I use R usually, but looking at my data I've realized that it'll be a pain to organize my data the way that I can import them to R, so I said "hell with it" and stored my data in multiple Excel sheets.
    I didn't even wanna bother looking for ways for importing on the internet.
    And today you uploaded this...
    Thank you!

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

    I am a beginner in R, I found your videos are so useful. Thank you so much

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

    Hey! Mak Marin ..yet I really found understanding R difficult but these tutorial are simply explained by you . Appreciating your efforts , keep growing sir and come up with new tutorials for us.

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

    Though I haven’t watched or started your series but am so thankful for ur efforts and excited to start right after new year

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

    Thank you Sir! The part about the missing values was exactly what I was looking for. Also perfect that you used two different types of missing values and how to deal with them both.

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

    This was soo good. very nicely explained. To evryone who ever is just spending their lots of time in search of a good R video ...This is the one. GO FOR IT!!!!

  • @khrystynakurta6494
    @khrystynakurta6494 3 года назад +2

    You just saved my life with your video, thank you !

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

    your way of explanation makes me crazy about R and enthusiastic to learn more and more. Thank you so much.

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

    I am a very novice R user and this tutorial was very easy to follow. I had checked out other tutorials and found that the others to be difficult to follow.

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

    Beautiful explanation Martin! Thank you for the video.

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

    Excellent class! Thank you so much for the video!

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

    Thank you so much for your videos!! They are very helpful and greatly appreciated.

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

    BEST VIDEO EVER AFTER SPENDING A LOT OF TIME WATCHING OTHERS.

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

    I started to learn R and tried so many tutorial videos and manual books. This is THE BEST in so many different ways. Concise but thorough. Thank you very much for your work!!!!

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

    that explanation is clear as sky..thanks man!

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

    Thank you for video. You had explain everything in simple way

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

    Thanks so much. This is very helpful.

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

    Beautifully explained

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

    Thank you Sir, this video helped me with my first Data Science assessment.

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

    Excellent tutorial. Thanks a lot.

  • @negusuworku2375
    @negusuworku2375 2 месяца назад

    Thank you. very helpful

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

    This is better and more useful than graduate school

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

      thanks @evry1loveronica for the kind words! it's always great to hear that our videos are making a difference! please share them with your friends and help us reach more people!

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

    R became super easy by listening these lectures

  • @yvonnemadegwa967
    @yvonnemadegwa967 5 лет назад +6

    Thank you very much. I have been struggling to understand R, till i found these simple tutorials, which are AWESOME

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

    I am taking the Georgia Tech Analytics courses, we are using R to do homework and project, but GT does not provide guidance on how to use R.
    So glad I found you here, one of the most useful videos.

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

      Many of our videos were designed for a few statistical courses as The University of British Columbia, so we likely cover everything you’ll need to know for your courses.

  • @sb-hf7tw
    @sb-hf7tw 4 года назад

    If I were know about you 2 years ago, I would have been an R expert just because of u, but it's not too late ever!!! Thanks a lot.👏👏
    👍👍👌🙏🙏🙏

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

      great to hear...and it is never too late! we've got a ton of videos, and were hoping to add some more R videos in the coming months...

    • @sb-hf7tw
      @sb-hf7tw 4 года назад

      MarinStatsLectures- R Programming & Statistics
      Most welcome

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

    nice demo

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

    great video

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

    I didn't know file importing was an art. I am genuinely impressed. Thank you.

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

    WOW, thank you very much

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

    Great job - Thanks a ton guys

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

    Nice

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

    R is my fav coding language

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

    You are my hero

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

    YOU SAVED ME just wow

  • @user-lk2ig5pk7p
    @user-lk2ig5pk7p 5 лет назад +2

    This was a very helpful tutorial and made it very easy to handle excels for me. Thanks a lot!

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

      You are welcome Ajay! Glad you found the video useful :)

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

    EXCELLENT!

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

    Thank you for sharing this video, you really saved my day :)

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

    Couldn't find xlsx file with 2nd sheet adding explanation to other variables. All apart from this is great. Thank you for the easy-to-understand materials! Also, your pronunciation is very clear, so I enjoy listening.

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

      did you solve it?Because I could not find as well

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

      @@aygulabdurrahimli1016 not really( I just skipped

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

      @@annas9942 OK.hopefully He will reply

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

      at the moment were not sure where that file went, and it doesn't seem to be posted. if we find it we will post it up there, but if you you can practice with any set of data that you have

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

    Is there any way to customize what all data R will read as NA, instead of just *** as mentioned in the video?
    Thank you!!

  • @shirinisabekova5504
    @shirinisabekova5504 3 года назад +2

    Could you please advise, I am having an trouble in importing: File

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

    Hey! Sir can I get reply of the question which I m going to mentioning below. - sir are you working on R software like if I want to learn from scratch to advance R software . Will I be able to get it from your tutorials??

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

    Here for Econ 333

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

    i have a sheet having following columns: day, month, year, rainfall value. i want to take sum of each month for each year. how it can b done in R?

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

    Sir, why the dataset on your website is difference with your display.? i

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

    Sir when i click on Import datasets and then click from Excel it says i do not have readxl package installed.please help what should i do
    regards
    Adi

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

    How could I import that data as a vector?
    I'd like to calculate mean(), sd(), etc

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

    I am a first time R user and am trying to import a Dataset from Excel. When I try to do so, it prompts me to install packages necessary so I click okay. It begins to download and runs script, but then it clicks out and never downloads. Do you know how I could fix this? I've been searching on the internet, but have found nothing. Thank you.

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

    Hello, I would like a little help... I already imported a data from excel.. and when I try to use , it appears... Error: `path` does not exist: ‘Table2.xlsx’... for example: Dtfrm

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

    Dear sir, will you please upload a complete statistics ply list organized by topics an entire course Thanks

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

      Try mine. Python and R playlists provide step by step detailed tutorials, with downloadable source files.

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

    First of all thank you for that kind of useful videos! But as others even me I could not find the second excel sheet.From the website I downloaded again but there is just one excel sheet.Please give us other alternatives.

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

      im trying to find the original file, but can't locate it at the moment...but really, you can try practicing with any data file that you have... if we can track down that file we will get it uploaded asap!

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

    Has anyone experienced that when running the second script code with LungCapData2, R did not do what it did in the video?
    I had to find for a way around. Still, it keeps me wondering.

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

      I have this question as well!! Anyone can explain this plz..??

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

    When I imported, all my variables came with an $, how do I change them back to normal? All my attempts, they come with it

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

    After importing the "code preview" into the console, how do I reuse the file next time? I didn't see you give it a file name.

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

      not sure if this is what you are looking for, but we have a separate video talking about creating/saving scripts... i think this may answer your question... ruclips.net/video/qqz_D1vzS5M/видео.html

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

    Hi how do I merge multiple data into 1

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

    at 6:27 why did you reimport with lungcap2 ?

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

      when I did it
      Error in View : object 'Book1xls1' not found
      this came in console

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

    5:00 code preview copy/paste

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

    Hi Mike, thank you so much for knowledge dissemination. In my little real-world experience of working with R, I have never felt a need of reading data from Excel files (perhaps, due to the reason that I was not aware of this function). All I have used, and seen other people using, are the functions like read.csv or read.table. In your experience, how often you have been in situations where using read_excel was obligatory or preferred?

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

      Hi, myself, i tend to use "read.table" and those sorts of functions most of the time. but i think being able to directly read Excel files has its place for certain times or certain users. it's not completely necessary./..i tend to work with files saved as ".csv" and just import through the command line...but this definitely helps make R more user friendly and more accessible, especially for those with less coding experience.
      the short answer is that it is not necessary at all, but a nice feature for certain times or certain individuals.

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

      MarinStatsLectures- R Programming & Statistics thank you for this response.

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

    Hi, when I am importing my excel data in R studio as explained, I am not able to modify the name and other details in Import Options section. Could you please help me know what could be the reason for this?

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

      Hi, i have no idea why that is. if youre using the "import dataset" tab you should be able to right there. we have other videos showing how to import using the "read.table()" command, so you could always try that if the menu is giving you trouble

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

    MarinStarsLectures- R Programming & Statistics, I need your help, when I import an excel file it says "is this a valid Excel file? There is no package called 'rland', what should I do?

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

    CRACK

  • @user-cr4hb8pk7m
    @user-cr4hb8pk7m 5 лет назад

    When I import data from excel, my computer shows a message "file nave conversion problem--name too long?". What is the meaning? How can I solve this problem? I just download datafile from statslectures.com/r-scripts-datasets LungCapData.xls

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

    Is this series only for MAC users?

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

      No, the R commands are the same for Mac and PC. It doesn’t matter which OS you are using

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

    Hi Mike, when I try to import EXCEL as the way you shown, it's failed. The error shows " is this a valid Excel file?". Why?

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

      Hi, it's hard to tell from a distance...but the error message seems to suggest that the file you are trying to import is not an excel file (with an extension of .xlsx of .xls)

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

      Hey how did this work out I’m having the same problem and I don’t know what to do

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

      @@pineapplesdontgrowontrees4529 I had the same problem, and it turns out I used a ; instead of : . It works now

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

    The practice data set is no longer available. Is there anyway you could upload it again? Would be greatly appreciated

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

      Hey there, there seems to be a problem with the links. try this link, it should work statslectures.com/r-scripts-datasets

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

      @@marinstatlectures The practice data set is not the same as the dataset in this video. Do you have links containing the dataset of this video? Thank you.

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

      @@marinstatlectures The LungCap and LungCap2 Excel files from there only have one worksheet, while in the video there are two.

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

    1:15 Now i am using .csv file and it doesn't work.

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

    god i hate ads