ABSTRACT

Base R and the recommended packages include several functions for importing and exporting data. Contributed packages provide both replacements for some of these functions and support for several additional file formats. In this chapter you will learn how to exchange data between R and the outside world, covering in detail the most common “foreign” data formats. Developing software to read and write files using foreign formats can easily result in long, messy, and ugly R scripts. This chapter will guide you on how to find functions that are well tested or validated and teach you how to use them to read data encoded using foreign formats. It also highlights the importance of checking that the “translation” between a foreign format and R has been error free.