Importing datasets

Importing data from external data sources and other applications is one of the key methods of getting data into R. It is rare that data will come as in an R ready dataset. Common formats will include:

Text files

Excel files/spreadsheets

Comma delimited files (CSV)

External databases

Binary files

Websites

We will examine methods for importing data from each of these sources.

Text files

There are many text file formats that can, using specific methods, be imported (read-in) into R. These include

CSV

Tab-delimited