Read
There are few basic functions available to read data into R.
- read.table, read.csv - To read tabular data. These functions are most commonly used function to read the data.
- readLine – To read the text files as each lines. This function can read any type of text files and will return a list of lines.
- source – It’s used to read the ‘R’ code. For example, if we want to read a R function from the file the ‘source’ function will be used to achieve it.
- dget – This is also used to read the ‘R’ code but actually the R objects that are deparsed in to text files.
- load, unserialize – These functions are used to read the binary object into R.
But there are different R packages developed to read different kind of other dataset.
Mostly in these functions we need to set few arguments to read the data effectively and it will increase the performance while dealing with large datasets.
Write
- write.table – To write tabular structure data to text files.
- writeLines – To write data/set of characters in line by line to files.
- dump – To dump a textual representation of multiple R objects.
- dput – To output a textual representation of an R object.
- save – To save objects (arbitrary number) into binary format.
- serialize - To convert objects into binary format.
The read/write parameters are mostly straightforward. But if you need more details of all the parameters for the functions, You can find the R manuals in this Link.