ABSTRACT

This chapter explores how to make a data frame; importing a data frame; and saving a data frame. The data frame is the fundamental unit for doing data analysis in R. A data frame is kind of like a spreadsheet. It is a table-like form of data which R can read. Computers handle data best when it is in a tidy form. The rules to tidy data are simple: every column is a variable, every row is an observation, and each cell consists of a single value. While it is good to understand how to simulate a data frame most of the time development practitioners will want to work on their real data. To do this they need to know how to import data. A data frame can always be viewed in it’s entirely in the R console. However, it starts to become impractical when the data frame is larger than the console window.