Skip to content

R Intro IV: Reading and writing text files

Bioinformatics Core Facility Gothenburg edited this page Sep 4, 2017 · 2 revisions
  • The next thing to do is to print the Orange_out data to a tab separated text file using the write.table() function. It is possible to look at tab separated files in Excel, but always start with a simple text editor as Excel may hide certain elements, and also make changes (for example the gene SEP15 may be interpreted as a date and turned into 01/09/2015 when imported into Excel).
    • Play around with the different arguments in write.table() and see what happens.
    • Now use the read.table() function to read the same data into R again, and save it as Orange_in.
    • Are Orange_in and Orange_out identical? Use the summary() function on each of them. Is there any difference?

Next: Plotting

Previous: Data Frames

Clone this wiki locally