Insights from Data with R
Latest Publications


TOTAL DOCUMENTS

10
(FIVE YEARS 10)

H-INDEX

0
(FIVE YEARS 0)

Published By Oxford University Press

9780198849810, 9780191884351

2021 ◽  
pp. 247-270
Author(s):  
Owen L. Petchey ◽  
Andrew P. Beckerman ◽  
Natalie Cooper ◽  
Dylan Z. Childs

In the previous chapter we looked at individual variables; however, a sample may involve more than one variable. Moreover, data analysis is usually concerned with the relationships among two or more variables. These relationships might involve the same (e.g. numeric versus numeric) or different (e.g. numeric versus categorical) types of variable. In either case, we need to understand how the values of one variable relate to and/or depend on those of the other. Just as with single-variable analyses, we use both descriptive statistics and graphical summaries to explore such relationships. This chapter focuses on associations between variables. An association is any relationship between two variables that makes them dependent, i.e. knowing the value of one variable gives us some information about the possible values of the second variable. The main goal of this chapter is to show how to use descriptive statistics and visualizations to explore associations among different kinds of variables.



Author(s):  
Owen L. Petchey ◽  
Andrew P. Beckerman ◽  
Natalie Cooper ◽  
Dylan Z. Childs

This and the next chapter involve us working through the process of getting insights from data. We have chosen a research subject that should have some interest to us all: food. More specifically, what bats eat. In this chapter you will experience a clearly specified set of research questions, learn how the study was performed and why it was done that way, and learn how to prepare your computer, R, and RStudio for the project, and how to read the dataset into R. The chapter also covers how you can clean, tidy, and manipulate the data in R. These are the solid foundations from which robust and reliable insights can grow.



2021 ◽  
pp. 271-282
Author(s):  
Owen L. Petchey ◽  
Andrew P. Beckerman ◽  
Natalie Cooper ◽  
Dylan Z. Childs
Keyword(s):  

After reading this book, what comes next? There is a lot that we decided to leave out of the book that we would have loved to put in. This chapter includes some pointers about what we left out, and what you could now start exploring. We also include a section on reproducibility, which covers the basics of what reproducibility is, why we might care about making our work reproducible, and what practical moves we can make towards achieving this.



2021 ◽  
pp. 141-168
Author(s):  
Owen L. Petchey ◽  
Andrew P. Beckerman ◽  
Natalie Cooper ◽  
Dylan Z. Childs

In the previous two chapters we experienced/demonstrated a data analysis workflow about variation in the diets of bats. In this and the next few chapters we will take a deeper dive into the details of R and of concepts. In this chapter, you will become much better acquainted with the wonderful world of the dplyr package. We look more carefully at the some of the core dplyr functions: ‘select’ (get some columns), ‘mutate’ (make a new column), ‘filter’ (get some rows), ‘arrange’ (order the rows), ‘group_by’ (add grouping information), and ‘summarise’ (calculate summary information about groups).



2021 ◽  
pp. 97-140
Author(s):  
Owen L. Petchey ◽  
Andrew P. Beckerman ◽  
Natalie Cooper ◽  
Dylan Z. Childs

In this chapter, we gain our first real insights about the data. We use visualizations and summarize the data to show how it is distributed and, among other things, that female bats eat larger prey on average than males. We also look at the data from a different perspective and show that the composition of prey species taken differs among female and male bats. This chapter covers a lot of new R, for example splitting our data into groups for summary statistics, and many new concepts. These will be explored in more detail in the following chapters.



Author(s):  
Owen L. Petchey ◽  
Andrew P. Beckerman ◽  
Natalie Cooper ◽  
Dylan Z. Childs

The goal of Insights from Data with R is to help you learn the most important tools in R, and the most important concepts, to allow you gain insights from data. After reading this book, and working along with the methods, you will have the tools to tackle a wide variety of challenges involved in getting insights from data using R. This chapter describes what we mean by ‘insights’ and introduces our overall workflow for gaining insights from data using R. We also introduce features of datasets that influence the types of insight one can gain, and introduce four workflow demonstrations, one of which is in the book, and three of which are online.



2021 ◽  
pp. 211-246
Author(s):  
Owen L. Petchey ◽  
Andrew P. Beckerman ◽  
Natalie Cooper ◽  
Dylan Z. Childs

Data analysis is not just about physically performing the analyses. We also need to think carefully about our data, and various issues that they might have. In this chapter, we explore conceptual issues raised by the bat diet workflow demonstration. This chapter discusses statistical variables, populations and samples, independence and non-independence in data, and working with numeric and categorical variables. In the last two items of that list, we look both at quantitative summaries of variables and relationships and also at graphical summaries.



2021 ◽  
pp. 169-194
Author(s):  
Owen L. Petchey ◽  
Andrew P. Beckerman ◽  
Natalie Cooper ◽  
Dylan Z. Childs
Keyword(s):  

In this chapter we go through some miscellaneous R topics, all of which you experienced briefly in the bat diet workflow demonstration. These include pipes, a mechanism for moving data from one operation to another; strings, how words and text are represented in computers using ‘stringr’; dates and times, until recently a proper pain anywhere on a computer, but now much simpler and straightforward to deal with, using the lubridate package; and pivoting, changing data from long to wide format, and wide to long, using the ‘pivot_longer’ and ‘pivot_wider’ functions in the tidyr package.



Author(s):  
Owen L. Petchey ◽  
Andrew P. Beckerman ◽  
Natalie Cooper ◽  
Dylan Z. Childs
Keyword(s):  

Before working through a real example of getting insights from data, we need to become acquainted with some tools we will use. Learning a bit about the tools first can help us feel more confident and comfortable when we then come to use them for real. Hence this chapter takes some time to introduce you to R and RStudio, including writing some simple commands, writing scripts, what to do when things seem to go wrong (as they often do!), what are functions, what are add-on packages, how to get help, and some common pitfalls to avoid.



2021 ◽  
pp. 195-210
Author(s):  
Owen L. Petchey ◽  
Andrew P. Beckerman ◽  
Natalie Cooper ◽  
Dylan Z. Childs

We have made quite a few graphs already but only briefly explained how we did so, specifically using ggplot. We need a deeper understanding… hence this chapter. We focus on making graphs with ggplot2. The ggplot2 package can help us to produce quite complex visualizations, with elements such as graphical keys, without the need to write lines and lines of R code. It is, nevertheless, still flexible enough for us to tweak the appearance of a figure so that it meets our specific needs. This chapter describes the underlying principles of the grammar used in ggplot2, and then demonstrates various kinds of plots and modifications to plots that ggplot2 can implement.



Sign in / Sign up

Export Citation Format

Share Document