BootcampR AN INTRODUCTION TO R Jason A. Heppler, PhD University of Nebraska at Omaha February 11, 2020 @jaheppler
Welcome!
Hi. I'm Jason. I like to gesture at screens. Digital Engagement Librarian , University of Nebraska at Omaha Mentor, Mozilla Open Leaders Researcher, Humanities+Design , Stanford University
Workshop structure • Lecture and hands-on exercises: 90 minutes. • Readings and resources available through the workshop website: https://tinyurl.com/unobootcamp • Campus-specific resources available through the Research Data Services guide and Data Visualization guide (libguides.unomha.edu)
Today's plan • Orientation to the workshop syllabus • Installation of R and RStudio (or rstudio.cloud) • Installation of packages we'll be using • Troubleshooting and getting/finding help
But first, what is R? • R is a programming language and environment for statistical computing and data visualization. • Base R refers to the standalone suite of pre-packaged functions that allow R to function as a language. • Extensions to R are called packages . • A package is a container of functions that gives R more flexibility.
"The bad news is that when ever you learn a new skill you’re going to suck . It’s going to be frustrating. The good news is that is typical and happens to everyone and it is only temporary . You can’t go from knowing nothing to becoming an expert without going through a period of great frustration and great suckiness." —Hadley Wickham
Cool. What's RStudio? • RStudio is an Interactive Development Environment (IDE) • Comes with a console, help and documentation, figures, project management, environment variables • Let's look at it quick!
Workspace: Script window: Lists objects currently You can store a document of accessible: datasets; commands you used in R to special functions; etc reference later or repeat an analysis. Plot/Help/Packages: Plots, help menu, packages, and files in your filesystem appear here. Console: Outputs appear here. The > sign means R is ready for input.
Neat. Let's get started. • Download the latest version of R: cloud.r-project.org Install R with the default settings. • Download RStudio: rstudio.com/products/rstudio/download Steps are here: https://jasonheppler.org/courses/bootcampr.2020/reading/01-reading/
Recommended RStudio setup • Tools > Global Options • Don't restore .RData into workspace • Never save workspace to .RData on exit
Installing packages If you already have RStudio and R on your machine, run: update.packages (ask = FALSE, checkBuilt = TRUE) In the console, type in the following and hit return: my_packages <- c ("tidyverse", "broom", "gapminder", "GGally", "ggraph", "ggrepel", "ggridges", "gridExtra", "here", "maps", "mapproj", "mapdata", "rlang", "scales", "sp", "usethis", "devtools") Then, in the console type in the following and hit return: install.packages (my_packages, repos = "http://cran.rstudio.com") Then, go grab a coffee. ☕
You mentioned alternatives to RStudio? • RStudio is available on the machines in the library. • rstudio.cloud for a cloud-based environment.
And the syllabus? Let's look it over. It's available here: https://tinyurl.com/unobootcamp
Questions? Troubleshooting? Next workshop: February 18, 1:30p-3p: Introduction to R (CL 112)
Recommend
More recommend