The basic function for reading text files is read.table. The most important information to supply to this function is a filename, a separator, and whether or not a row header is included. There are also some other important options to consider when reading in a file using read.table function:
- header: set to header=TRUE if the first line of the input data contains column header information.
- col.names: if you will be supplying your own column names, use this option to specify the columns names in a vector.
- na.string: The default for this is NA; however, input data contains a variety of codes that can represent NA, or can even have multiple NA values. Sometimes, the values 0, 9, or other characters such as . can be used ...