Book Image

Learning R for Geospatial Analysis

By : Michael Dorman
Book Image

Learning R for Geospatial Analysis

By: Michael Dorman

Overview of this book

Table of Contents (18 chapters)
Learning R for Geospatial Analysis
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
External Datasets Used in Examples
Cited References
Index

Chapter 2. Working with Vectors and Time Series

In this chapter, we are going to cover the basic data structure in R—a vector. Understanding vectors is the foundation for all the subsequent chapters. You will learn how to perform efficient operations on numeric and logical vectors and how to create subsets. After this, you will learn how to write custom functions in order to expand and customize R's capabilities. Working with dates and time series and the use of graphical functions are introduced at the end of this chapter.

In this chapter, we'll cover the following topics:

  • Creating, saving, and examining the three main types of vectors

  • The principles of performing operations on vectors in R

  • Using functions that have more than one argument

  • Creating subsets of vectors

  • Dealing with missing values in vectors

  • Writing new functions

  • Working with dates

  • Displaying and saving graphical output