How do I import a CSV file in R?

How do I import a CSV file in R?

Hi,

I have a CSV file with 900000 records and I want to load it for analytics.

How do I import a CSV file in R?

Thanks

View Answers

December 25, 2017 at 3:37 AM

Hi,

R Programming language is very powerful programming language for machine learning and mathematical computing. It comes with more than 5000 packages for various purposes.

These days it is used for large scale data analytics on cluster. It provides support for getting data from database, excel files, csv files, xml files, etc..

Here is example of loading the data from csv file:

data = read.csv("data.csv", header = TRUE)

Above code loads the data from data.csv file and uses first row as header. If in your data file you don't have header then you can set header=FALSE. e.g.:

data = read.csv("wine.csv", header = FALSE)

Check more at R PROGRAMMING TUTORIALS page.

Thanks

Ads









Related Tutorials/Questions & Answers:
How do I import a CSV file in R?
How do I compress a tar file in Linux
Advertisements
How do I compress a tar file in Linux
How do I compress a tar file in Linux
how to do actionsheet in iphone?-RV
how to do map in iphone?-RV
How do I install a .deb file via the command line?
how do i upload a file by using servlet or jsp?
How do I read a variable from a file in shell script
how do i allow users to download a xls file in html?
How do I read a large file quickly in Java?
I developed a simple java web project in Struts now If I have to import the project in Eclipse Indigo how can I do it
how to do CRUDE operation in iphone?-RV
how I do select from select in hql
How do I upgrade mysql?
How can I do it? .click();
how to convert .xml file to csv file
How to write into CSV file in Java
How ro convert char into string??
how do i solve this problem?
how do i solve this question?
How do i do the coding for 'leaving a comment' in java
How do I decompile Java class files?
How do I initialize a byte array in Java?
How do I compare strings in Java?
how to parse a csv file using standard libraries?
How do I compile the registration form?
How do I get started with Bootstrap
How do I get started with Bootstrap
How do I learn Spring Framework?
How do I learn Spring Framework?

Ads