Reader small image

You're reading from  Hands-On Exploratory Data Analysis with R

Product typeBook
Published inMay 2019
Reading LevelIntermediate
PublisherPackt
ISBN-139781789804379
Edition1st Edition
Languages
Tools
Right arrow
Authors (2):
Radhika Datar
Radhika Datar
author image
Radhika Datar

Radhika Datar has more than 5 years' experience in software development and content writing. She is well versed in frameworks such as Python, PHP, and Java, and regularly provides training on them. She has been working with Educba and Eduonix as a training consultant since June 2016, while also working as a freelance academic writer in data science and data analytics. She obtained her master's degree from the Symbiosis Institute of Computer Studies and Research and her bachelor's degree from K. J. Somaiya College of Science and Commerce.
Read more about Radhika Datar

Harish Garg
Harish Garg
author image
Harish Garg

Harish Garg is a Principal Software Developer, author, and co-founder of a software development and training company, Bignumworks. Harish has more than 19 years of experience in a wide variety of technologies, including blockchain, data science and enterprise software. During this time, he has worked for companies such as McAfee, Intel, etc.
Read more about Harish Garg

View More author details
Right arrow

Introducing and reading a dataset

In this chapter, we will focus on a macroeconomic dataset that is found in a built-in library called dataset in R. It provides a well-known example of a highly collinear regression.

The data frame includes seven economical variables, observed yearly from 1947 to 1962 (n=16):

> library(pls)
> data(longley)

As discussed in previous chapters, we will carry out the following steps to read the data structure:

  1. After including the necessary libraries, you can have a look at the attribute structure:
> longley
GNP.deflator GNP Unemployed Armed.Forces Population Year Employed

1947 83.0 234.289 235.6 159.0 107.608 1947 60.323
1948 88.5 259.426 232.5 145.6 108.632 1948 61.122
1949 88.2 258.054 368.2 161.6 109.773 1949 60.171
1950 89.5 284.599 335.1 165.0 110.929 1950 61.187
1951 96.2 328.975 209.9 309.9 112.075 1951 63.221
1952 98.1 346.999 193.2 359.4...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Hands-On Exploratory Data Analysis with R
Published in: May 2019Publisher: PacktISBN-13: 9781789804379

Authors (2)

author image
Radhika Datar

Radhika Datar has more than 5 years' experience in software development and content writing. She is well versed in frameworks such as Python, PHP, and Java, and regularly provides training on them. She has been working with Educba and Eduonix as a training consultant since June 2016, while also working as a freelance academic writer in data science and data analytics. She obtained her master's degree from the Symbiosis Institute of Computer Studies and Research and her bachelor's degree from K. J. Somaiya College of Science and Commerce.
Read more about Radhika Datar

author image
Harish Garg

Harish Garg is a Principal Software Developer, author, and co-founder of a software development and training company, Bignumworks. Harish has more than 19 years of experience in a wide variety of technologies, including blockchain, data science and enterprise software. During this time, he has worked for companies such as McAfee, Intel, etc.
Read more about Harish Garg