R Programming Tutorial – 15 – How to Read CSV Files

Facebook – https://www.facebook.com/TheNewBoston-464114846956315/
GitHub – https://github.com/buckyroberts
Google+ – https://plus.google.com/+BuckyRoberts
LinkedIn – https://www.linkedin.com/in/buckyroberts
reddit – https://www.reddit.com/r/thenewboston/
Support – https://www.patreon.com/thenewboston
thenewboston – https://thenewboston.com/
Twitter – https://twitter.com/bucky_roberts


David says:

Hey Bucky when are we going to get the other videos about stats and graphs and all that good stuff 😉

They Pheaktra says:

Nice tutorial.! Please will make “Hadoop Tutorial”.

Oneironaut says:

Hey Bucky, I’m a new subscriber and I just want to tell you that I appreciate this tutorial. I have managed to get my brother who is a scientist in the field of biology to watch the first few episodes. Most scientists suck at programming and statistics so keep this up and we might be able to contribute to something bigger… like a non-sucky scientist :)

blox6137 says:

Bucky, can you teach us Lua? Several games use this scripting language such as Gmod, and ROBLOX, and apparently Dont Starve. so does WoW.

Bruce Levy says:

First time with R going through your videos. How do you all remember all these commands and stuff?

asqn007 says:

It is also possible to just write F/T instead of FALSE/TRUE and everything will be the same. Plus you can use read.table function that can also make the same data.frame and I hope you will show attach function next time (just a small hints)

I really love your tuts and I hope I will learn much more from your vids. You are making this world better! :)

Nigel Barink says:

Can’t wait for the next one ! Awesome series bucky

Jaini Shah says:

it is what it is

Grim Reaper says:

First! 😀


Error in file(file, “rt”) : cannot open the connection
In addition: Warning message:
In file(file, “rt”) :
cannot open file ‘br- Sheet1,True,’: No such file or directory
> fish
Error: object ‘fish’ not found

Blueprint says:

Hey Bucky could you please teach R with a backend language such as PHP or Python? Please!

naison mandigo says:

bro you are heavy…thank you so much

Eden Buke says:

Hi Bucky, can you give as some tutor on matlab; specially on image processing using matlab.

Jasmine S says:

i keep getting Error in file(file, “rt”) : cannot open the connection
In addition: Warning message:
In file(file, “rt”) : cannot open file ‘SEO’: No such file or directory

mizanoor rahman says:


JIE QI says:

thank you man

Java-Tutorial says:

Very nice …

jg b says:

Couple notes
1. Excel files have multiple pages, but CSV files may only have 1
2. The CSV must be formatted such that only a header and columns of homogeneous values are present (he alluded to this already by saying it will be read as a data frame rather than generally as a list)
3. The data frame and CSV will not save formulaic data from an Excel file, but rather just the final numerical output of those formulae to each cell
4. Obviously, it also doesn’t save any aesthetic changes to the cells or font, so a lot of data may be lost in this transfer if the original file is Excel
5. CSVs cells also are not able to refer to cells from other files; they’re kind of dumb in general.


Here’s a linear regression of the CSV file that used in this tutorial:
csvFile <- read.csv(“D:/Projects_Programming/R/brUsers.csv”,TRUE,”,”) plot(csvFile$age, csvFile$income, xlab = “Age”, ylab = “Income”) ageMean <- mean(csvFile$age, na.rm = T) ageMean abline(v=ageMean) model1 = lm(income~age, data=csvFile) abline(model1, col=”red”) summary(model1) —————Have fun———————————————- =D

JP Santiago says:

it would be nice if you zoomed in so that we can see the script

Eden Goldfarb says:

hey man just wanted to share my gratitude!

Tobias Dettinger says:

first error: more columns than column names.
second error file not foind, i had in in my Documents.

Scott Re says:

Hey Bucky, great series but you stopped when it started to get interesting (plotting).

zakaria sediki says:

hey bucky, can you please upload more videos, i can’t wait.

Dan simi says:

where is the link for csv file ?

Daan Burgering says:

Thanks Bucky!!
This is a new program for me and your tutorials really help me!!
Keep it up!!

BonJoviFan13 says:

Wheres the link for the csv file? :(

Blake Starling says:

Thanks a ton for these tutorials, you make learning programming simple and approachable :)

Rashmi Dogra says:

How can we set the path …..setwd()..getting error in Mac

Matthew Donovan says:

No link for the csv file =/

Badplum25 says:

Mwahahaha time to hack clash of clans :p

Write a comment


Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.

Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!

Send this to a friend

▷ Other ReviewsVehicles   Show Cars   Motorbikes   Scooters   Bicycles   Rims & Tires   Luxury BoatsFashion   Sunglasses   Luxury Watches   Luxury Purses   Jeans Wear   High Heels   Kinis Swimwear   Perfumes   Jewellery   Cosmetics   Shaving Helpers   Fashion Hats   Modeling TipsFooding   Chef Club   Fooding Helpers   Coktails & LiquorsSports   Sport Shoes   Fitness & Detox   Golf Gear   Racquets   Hiking & Trek Gear   Diving Equipment   Ski Gear   Snowboards   Surf Boards   Rollers & SkatesEntertainment   DIY Guides   Zik Instruments   Published Books   Music Albums   Cine Movies   Trading Helpers   Make Money   Fishing Equipment   Paintball Supplies   Trading Card Games   Telescopes   Knives   Vapes   GameplaysHigh Tech   Flat Screens   Tech Devices   Camera Lenses   Audio HiFi   Printers   USB Devices   PC Hardware   Network Gear   Cloud Servers   Software Helpers   Programmer Helpers   Mobile Apps   Hearing AidsHome   Home Furniture   Home Appliances   Tools Workshop   Beddings   Floor Layings   Barbecues   Aquarium Gear   Safe Boxes   Office Supplies   Security Locks   Cleaning ProductsKids   Baby Strollers   Child Car Seats   Remote ControlledTravel   Luggages & Bags   Airlines Seats   Hotel Rooms   Fun Trips   Cruise Ships   Mexico Tours