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









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?
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 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?
how to do CRUDE operation in iphone?-RV
how I do select from select in hql
How ro convert char into string??
How do I upgrade mysql?
ModuleNotFoundError: No module named 'rf-perm-feat-import'
how to convert .xml file to csv file
How to write into CSV file in Java
How can I do it? .click();
What changes I have to do in php.ini file for file uploading?
how do i solve this problem?
how to parse a csv file using standard libraries?
how do i solve this question?
How do i do the coding for 'leaving a comment' in java
How do I initialize a byte array in Java?
How do I decompile Java class files?
How do I compare strings in Java?
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?
How do I learn Spring Framework?
How do I learn Spring Framework?
How do I learn Spring Framework?
How do I study big data?
How do I start machine learning with Python? What should I do if I am a beginner?
How do I generate random number?
How do I do this program? I'm new to Java programming...
how do i grab the url in php?
How do I start learning MongoDB?
How do I download urllib3 for python 2.7
How do I learn Python data science?
How do I start a data mining company?
How do I get a job in AI field?
How do I start learning AI?
How do I become an AI engineer?
How can I do data science course?
How do I become a data scientist in India?

Ads