O'Reilly logo

Practical Predictive Analytics by Ralph Winters

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The read.table function

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required