How do I import a CSV file in R?

Ads
 

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 to do map in iphone?-RV
Advertisements
how to do actionsheet in iphone?-RV
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 do i upload a file by using servlet or jsp?
How do I read a large file quickly in Java?
how do i allow users to download a xls file in html?
How to write into CSV file in Java
how to convert .xml file to csv file
How ro convert char into string??
how I do select from select in hql
how to parse a csv file using standard libraries?
How do I upgrade mysql?
How can I do it? .click();
how do i solve this problem?
how do i solve this question?
Java Write To File CSV
how to display csv file directly in IE browser .
how to export the query result in SQL Server to .csv file?
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 save form data to a csv file using jquery or ajax
What changes I have to do in php.ini file for file uploading?
Exporting data from mysql to csv file
How do i do the coding for 'leaving a comment' in java
How do I compile the registration form?
.csv file to databse
Creating a File I/O using import scanner, io.* and text.*
how to sort multiple key columns in CSV file - Java Beginners

Ads