Here we'll continue our exploration of typical errors in the data import process.
NOTE!
read.table()
can also import data from ftp and http servers, but (sadly) not from https servers.- 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 notread.table()
. In general, this is not a problem (and is even better for extremely large data sets) as long as you remember thatread_table()
does not automatically convert strings to factors (likeread.table()
does). This means that you need to either:- Convert your factors manually after import
- Specify data type for those columns as "factor" in the GUI
- Copy the code into the editor and modify it to use
read.table()
.