Import

Import Data into R - Part 2

Introduction This is the second post in the series Importing Data into R. In the previous post, we explored reading data from flat/delimited files. In this post, we will: list sheets in an excel file read data from an excel sheet read specific cells from an excel sheet read specific rows read specific columns read data from - SAS - SPSS - STATA Libraries, Data & Code We will use the readxl package.

Import Data into R - Part 1

Introduction In this post, we will learn to: read data from flat or delimited files handle column names/header skip text/info present before data specify column/variable types read specific columns/variables Libraries, Data & Code We will use the readr package. The data sets can be downloaded from here and the codes from here. library(readr) Types of Delimiters Before we start reading data from files, let us take a quick look at the different types of delimiters we have to deal with while reading or importing data.