Book Image

R Graphs Cookbook Second Edition

Book Image

R Graphs Cookbook Second Edition

Overview of this book

Table of Contents (22 chapters)
R Graphs Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction


In Chapter 1, R Graphics, and Chapter 3, Beyond the Basics – Adjusting Key Parameters, we learned some basics of how to make line graphs and customize them by setting certain arguments as per our needs. In this chapter, we will learn some intermediate to advanced recipes to customize line graphs even further. We will look at ways to improve and speed up line graphs with multiple lines that represent more than one variable.

One of the most used forms of line graphs is time trends or time series, where the X variable is some measure of time such as year, month, week, day, hour, and so on. Reading, formatting, and plotting dates can be quite tricky in R. In this chapter, we will see how to deal with dates and process them to make time series charts with custom annotations, grid lines, uncertainty bounds, and markers.

We will also learn to make some interesting and popular types of time series charts such as sparklines and stock charts.

As the recipes in this chapter are slightly more...