An Introductory Guide to R

Easing the Learning Curve

Eric L. Einspruch

HardcoverPaperbacke-bookprint + e-book
Hardcover
July 13, 2022
ISBN 9781462549894
Price: $85.00
196 Pages
Size: 7⅜" x 9¼"
order
Paperback
July 13, 2022
ISBN 9781462549887
Price: $35.00
196 Pages
Size: 7⅜" x 9¼"
order
e-book
August 10, 2022
PDF ?
Price: $35.00
196 Pages
order
print + e-book
Paperback + e-Book (PDF) ?
Price: $70.00 $38.50
196 Pages
order

A friendly, straightforward guide that does not assume knowledge of programming, this book helps new R users hit the ground running. Eric L. Einspruch provides an overview of the software and shows how to download and install R, RStudio, and R packages. Featuring example code, screenshots, tips, learning exercises, and worked-through examples of statistical techniques, the book demonstrates the capabilities and nuances of these powerful free statistical analysis and data visualization tools. Fundamental aspects of data wrangling, analysis, visualization, and reporting are introduced, using both Base R and Tidyverse approaches. Einspruch emphasizes processes that support research reproducibility, such as use of comments to document R code and use of R Markdown capabilities. The book also helps readers navigate the vast array of R resources available to further develop their skills.

“The uniqueness of this book is that it seems to understand how a broad set of individuals might come to learning R. Most books on the topic are written for computer programmers (computer science majors, computational biologists), or at least for people with some programming experience. This text takes the reader through the R environment in a manner that does not presuppose programming experience, making it a true (and effective) introductory guide.”

—Charlotte Tate, PhD, Department of Psychology, San Francisco State University


“I will use this book as a researcher and will recommend it to students and colleagues. The author provides easy-to-follow steps and screenshots to help users get started with R and to perform many common statistical analyses. The example datasets are useful, as are the explanations of the output. This book is practical, helpful, and timely.”

—Julie Combs, EdD, Department of Educational Leadership, Sam Houston State University


“This is a very useful book for faculty, undergraduates, or graduate students who are interested in learning R. Einspruch does a great job of describing the many different 'data-cleaning' tasks that are often required prior to more complex analyses. I also like the instructions for producing R Markdown files. I will definitely consider using this book as a supplementary text for my undergraduate Introduction to Statistics course.”

—Katerina M. Marcoulides, PhD, Department of Psychology, University of Minnesota


“This text provides a basic introduction to R and its use in statistical analyses. It demonstrates Base R, RStudio, and Tidyverse, and walks the reader through using ggplot. I suggest this as a basic text for anyone using R in undergraduate or graduate courses, specifically for students who are not familiar with R. It will also be helpful to practitioners who want to understand and begin to use R in their work.”

—Darlene Russ-Eft, PhD, College of Education (Emeritus), Oregon State University; clinical faculty, Department of Technology Leadership and Innovation, Purdue University


“The book is a handy resource for learning and using R effectively, and for teaching statistics with free software. Given the no-cost software, students are more likely to use R beyond the formal program of study.”

—Michele A. Parker, PhD, Department of Educational Leadership, University of North Carolina at Wilmington

Table of Contents

1. Introduction

- Purpose of This Book

- What You Will be Able to Do after Reading This Book

- Whom This Book Is For

- Approach

2. Getting Started

- Download and Install R

- Download and Install RStudio

- RStudio Fundamentals

- Download, Install, and Load R Packages

- Read Data into R

- Write Data Files

- Entering Data via Inline Code

- Cleaning Variable Names

- Clearing the Console

- Clearing the Environment

- Some Thoughts on Debugging R Code

3. Data Wrangling

- Example Data

- The Pipe

- Select Variables

- Select Cases

- Missing Data (Part I)

- Recode Variables

- Arithmetic and Logical Operators

- Missing Data (Part II)

- Identify and Change Variable Types

- Change Factor Value Labels

- Join Data Frames

- Aggregate (Summarize) Data

- Wide and Long Data Formats

4. Descriptive Statistics, t-Tests, One-Way ANOVA, and Chi-Square Test

- Descriptive Statistics

- t-Tests

- One-Way ANOVA

- Crosstabulation

5. Factorial ANOVA, Repeated-Measures ANOVA, Correlation, and Regression

- Factorial ANOVA

- Repeated-Measures ANOVA

- Correlation

- Regression

6. Data Visualization

- Layered Grammar of Graphics

- Bar Chart

- Boxplot

- Line Graph

- Scatterplot

- Regression Diagnostics

- Saving a Chart

7. R Markdown

- Markdown Template

- Working in Markdown

8. Functions

9. Next Steps

- Finding Help

- Learn More about R and R Programming

- Community

- Learn More about Statistics

- Updating R, R Packages, and RStudio

10. Conclusion

Appendix A. R Data Structures

Appendix B. Suggested Answers to Exercises

References

Index


About the Author

Eric L. Einspruch, PhD, is an independent researcher and program evaluator based in Oregon. Since the 1980s, Dr. Einspruch has led, managed, and conducted a wide variety of studies to inform policy development and program improvement. As an adjunct professor at Portland State University and elsewhere, he has taught graduate, undergraduate, and certificate courses in the areas of program evaluation, research methods, data analysis, and emergency preparedness. Dr. Einspruch’s work has appeared in peer-reviewed journal articles, books, and book chapters. He is the recipient of Portland State University’s inaugural Adjunct Excellence Award for Research, and, with his coauthors, received the Helen Tobin Writers’ Award for an article published in the Journal for Nurses in Staff Development. Dr. Einspruch was among the organizers of the Oregon Program Evaluators Network, a local affiliate of the American Evaluation Association, and served as its charter secretary during its first 2 years and as its fifth president. He is an avid learner of new ideas, information, and skills who enjoys helping others advance their own learning. His website is www.eleconsulting.com.

Audience

Students and researchers in education, psychology, human development, sociology, management, nursing, and public health.

Course Use

Will serve as a supplemental text for advanced undergraduate- and graduate-level statistics courses, or as the main text for an Introduction to R course.