class: center, middle, inverse, title-slide .title[ # MATH 204 Introduction to Statistics ] .subtitle[ ## Lecture 3: Intro to R ] .author[ ### JMG ] --- ## Goals for Lecture * Learn the basics of R necessary for Chapter 2 on summarizing data. -- * That is, we introduce: -- * Arithmetic in R. * How R represents data. * Data frames in R. * Working with data in R. * Installing and loading packages. -- * Two helpful references are the online books [Applied Statistics with R](https://book.stat420.org/) and [Probability, Statistics, and Data A Fresh Approach Using R](https://mathstat.slu.edu/~speegle/_book/preface.html). --- ## What is R? [R](https://www.r-project.org/) is a free software environment for statistical computing. -- * We can use R for -- * Basic statistical calculations -- * Statistical plots -- * Statistical modeling -- * Presenting and sharing results of data analyses --- ## What is RStudio? [RStudio](https://www.rstudio.com/) is an integrated development environment (IDE) for R. -- * We can use RStudio for -- * Easier coding with R (plus some other languages) -- * Working with R in a more interactive fashion -- * Accessing R online via [RStudio cloud](https://www.rstudio.com/products/cloud/) projects -- * R plus RStudio and the ever growing R ecosystem facilitate work in statistics and data science. These tools are used by professionals and academics in a variety of fields, and gaining experience with R can be valuable for your future. --- class: center, middle ## Try It Let's go to an [RStudio cloud](https://www.rstudio.com/products/cloud/) project and do some coding. --- ## Summary In this lecture, we covered the basics of R necessary for working with data and obtaining numerical and graphical summaries as will be covered in Chapter 2. -- * In particular, we learned -- * How to do basic arithmetic in R. * How R represents data. * About data frames in R. * About working with data in R. * How to install and load R packages. --- ## Next Time * In the next lecture, we will begin our discussion of Chapter 2 on summarizing data. -- * We will cover -- * Numerical summaries such as mean, median, variance, and standard deviation. -- * Tables. -- * Visual data summaries such as histograms, box plots, bar plots, scatter plots, and mosaic plots. -- * To get a head start on Chapter 2 content, see the videos embedded in the next few slides. --- ## Video: Numerical Data Summaries
--- ## Video: Categorical Data Summaries
--- ## Notes --- ## Notes --- ## Notes