If there are no commented lines in your file, it’s worth setting this to be the empty string “”. comment.char, a character string indicating the comment character.By default read.table() reads an entire file. nrows, the number of rows in the dataset.colClasses, a character vector indicating the class of each column in the dataset.sep, a string indicating how the columns are separated.header, logical indicating if the file has a header line.file, the name of a file, or a connection.The read.table() function has a few important arguments:
TO get the help file for read.table() just type ?read.table in R console. The read.table() function is one of the most commonly used functions for reading data in R.
dget() function is also used for reading in R code files.source() is a very useful function for reading in R code files from a another R program.readLines() is used for reading lines from a text file.
read.table() and read.csv() are two popular functions used for reading tabular data into R.There are a few very useful functions for reading data into R.