Posts

Showing posts from December, 2017

HOW TO IMPORT DATA IN R

Image
R can import data from a variety of sources. It can import data from excel files , comma separated files , tab separated files , special character delimited files, a SQL Server , Oracle Server or any database system that supports ODBC driver. In this article, I will be demonstrating how to do this from a couple of sources. Let’s start with the simplest of them all. Comma Separated Files: Comma separated files are files where columns in your data are separated by commas. A typical comma separated file would look like this. Now, we will see how we can import it in R. R has a built in function to import comma separated files in R. We will use it to import file. read.csv(file = "E:\Data Analytics\a.txt" , header = TRUE , sep = ",") Now, I will explain this command in detail. ·          Read.csv is the function used to import file in R. ·          File parameter is used to p...