Chapter 3. Working with Tables
Working with tables is central to programming in R, both with regards to spatial analysis (for example, working with attribute tables of geometries) and more generally. In this chapter, we will learn how to work with tables on their own, while in the subsequent chapters, we will see the ways that spatial data analysis involves dealing with tables. At the same time, two central subjects, which we will have to be familiar with for the subsequent chapters, will be introduced. These are working with contributed packages in R and controlling code execution.
As a central example, we will work with real-world data (monthly climatic records for Spain, which were downloaded from the NOAA archive) so that we can witness several very common cleaning and reshaping procedures of tables.
In this chapter, we'll cover the following topics:
- Working with
data.frame
objects to represent tables in R - Controlling code execution through conditional statements and loops...