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

Using the data.frame class to represent tabular data


In this section, you will learn how tables are represented in R and how you can work with tabular objects. In particular, you will learn two common ways to create table objects (from vectors or by reading a file from the disk). Afterwards, you will learn how to examine, subset, and make calculations with tables.

Creating a table from separate vectors

The data.frame class is the basic class to represent tabular data in R. A data.frame object is essentially a collection of vectors, all with the same length. However, the vectors do not have to be of the same type. They may also include one-dimensional objects that are not strictly vectors, such as Date or factor objects (see the previous chapter). Therefore, data.frame objects are particularly suitable to represent data with different variables in columns and different cases in rows. Thus, variables may be of different types; for example, a table storing climatic data may have one character...

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