O'Reilly logo

Bioinformatics with R Cookbook by Paurush Praveen Sinha

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

Reading and writing data

Before we start with analyzing any data, we must load it into our R workspace. This can be done directly either by loading an external R object (typical file extensions are .rda or .RData, but it is not limited to these extensions) or an internal R object for a package or a TXT, CSV, or Excel file. This recipe explains the methods that can be used to read data from a table or the .csv format and/or write similar files into an R session.

Getting ready

We will use an iris dataset for this recipe, which is available with R Base packages. The dataset bears quantified features of the morphologic variation of the three related species of Iris flowers.

How to do it…

Perform the following steps to read and write functions in R:

  1. Load ...

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