Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning R for Geospatial Analysis

You're reading from   Learning R for Geospatial Analysis Leverage the power of R to elegantly manage crucial geospatial analysis tasks

Arrow left icon
Product type Paperback
Published in Dec 2014
Publisher Packt
ISBN-13 9781783984367
Length 364 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Michael Dorman Michael Dorman
Author Profile Icon Michael Dorman
Michael Dorman
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. The R Environment FREE CHAPTER 2. Working with Vectors and Time Series 3. Working with Tables 4. Working with Rasters 5. Working with Points, Lines, and Polygons 6. Modifying Rasters and Analyzing Raster Time Series 7. Combining Vector and Raster Datasets 8. Spatial Interpolation of Point Data 9. Advanced Visualization of Spatial Data A. External Datasets Used in Examples
B. Cited References
Index

Vectors – the basic data structures in R


A vector is an ordered collection of values of the same type (or mode, in R terminology). As mentioned in the previous chapter, the three types of values that are useful for most purposes (including the topics of this book) are numeric, character, and logical. In this section, you are going to learn about several methods to create vectors, check the properties of interest for the given vectors, and perform operations involving pairs of vectors. You are also going to learn how to save the objects we create in the temporary computer memory via assignment.

Different types of vectors

Vectors are the most basic data structures in R since single elements (such as the number 10) are also represented in R by vectors (of length 1). As we have previously seen, when we enter a numeric value on the command line, it is printed on the screen. The number in square brackets to the left of the value is, in fact, the position of the leftmost element in the respective...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image