Reading contents of a Text File in R Programming - read.table() Function
The read.table() function in R can be used to read a text file's contents. A versatile and often used function for reading tabular data from different file formats, including text files, is read.table(). It returns the data in the form of a table. Syntax: read.table(filename, header = FALSE, sep = "