8.5 - Common Data Import Problems: Part ii

Here we'll continue our exploration of typical errors in the data import process.

  1. read.table() can also import data from ftp and http servers, but (sadly) not from https servers.
  2. The "Import Dataset" icon in the "Environment" tab in RStudio - there is a nice tool here that lets you choose a file and set it up for import - it even writes the line of code into the console, so you can copy it to your editor. Note that this tool uses read_table()(from the package "readr") and not read.table(). In general, this is not a problem (and is even better for extremely large data sets) as long as you remember that read_table() does not automatically convert strings to factors (like read.table() does). This means that you need to either:
    1. Convert your factors manually after import
    2. Specify data type for those columns as "factor" in the GUI
    3. Copy the code into the editor and modify it to use read.table().