Before you can start exploring your data, you first need to import it into your data analysis environment. There are many types of data, ranging from plain data in comma-separated value files to binary data in databases. Different R packages are equipped to handle these different kinds of data expertly and to import them almost ready for use in our environment. Since we are using R and RStudio, we will describe some of the most powerful R packages to import data in the following sections:
- readr: readr can be used to read flat, rectangular data into R. It works with both comma-separated and tab-separated values.
- readxl: We can use the readxl package to read data from MS Excel files.
- jsonlite: Web services have increasingly started to provide data in a JSON format. The jsonlite package is a good way to import this kind of data into R.
- httr, rvest: httr, and rvest...