BootcampR AN INTRODUCTION TO R Jason A. Heppler, PhD University of - - PowerPoint PPT Presentation

bootcampr
SMART_READER_LITE
LIVE PREVIEW

BootcampR AN INTRODUCTION TO R Jason A. Heppler, PhD University of - - PowerPoint PPT Presentation

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,


slide-1
SLIDE 1

BootcampR

AN INTRODUCTION TO R

Jason A. Heppler, PhD University of Nebraska at Omaha February 11, 2020 @jaheppler

slide-2
SLIDE 2

Welcome!

slide-3
SLIDE 3
  • 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

slide-4
SLIDE 4

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)

slide-5
SLIDE 5

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
slide-6
SLIDE 6

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.

slide-7
SLIDE 7

"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

slide-8
SLIDE 8
slide-9
SLIDE 9
  • 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!
slide-10
SLIDE 10

Script window: You can store a document of commands you used in R to reference later or repeat an analysis. Console: Outputs appear here. The > sign means R is ready for input. Workspace: Lists objects currently accessible: datasets; special functions; etc Plot/Help/Packages: Plots, help menu, packages, and files in your filesystem appear here.

slide-11
SLIDE 11
  • 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/

slide-12
SLIDE 12

Recommended RStudio setup

  • Tools > Global Options
  • Don't restore .RData into workspace
  • Never save workspace to .RData on exit
slide-13
SLIDE 13

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. ☕

slide-14
SLIDE 14

You mentioned alternatives to RStudio?

  • RStudio is available on the machines in the library.
  • rstudio.cloud for a cloud-based environment.
slide-15
SLIDE 15

And the syllabus?

Let's look it over. It's available here: https://tinyurl.com/unobootcamp

slide-16
SLIDE 16

Questions? Troubleshooting?

Next workshop: February 18, 1:30p-3p: Introduction to R (CL 112)