Introduction to R/RStudio
Melody S. Goodman · 2025
In this workbook, I will use the statistical program R with the integrated development environment RStudio to complete problems; other programs used in the workbook are SAS® and Stata®. This workbook aims to teach statistical concepts, so we have tried to make the computing aspect of this text as simple as possible. In each chapter throughout the workbook, we will review some R pointers and sample code containing the information we need to complete the computing for that chapter. This lab provides a beginner’s guide to using R software; it assumes no previous knowledge of R or any other statistical software program. It begins with technical aspects, such as the layout of the program and menu navigation. It moves on to importing data into the program and performing various procedures related to data management and data cleaning, as well as variable recoding and labeling. Sample code is given for descriptive statistics ( Chapter 1 ) and graphing procedures. Users will begin to understand the R programming language and coding structure through experiential examples. I use R version 4.4.2 (2024-10-31) and RStudio 2024.12.0 (Build 467) throughout this workbook, but most commands will be similar regardless of which R and RStudio version is being used (although I recommend updating the software as appropriate).