John Little (@libjohn) & Joel Herndon (@herndonj) 2018-03-27
-
Code
-
Repo -- Datafest Intro2R repo
This repository contains supporting datasets and files for our Intro to R workshop by the Data & Visualization Services Department, Duke University Libraries. You can find more information about our future and past workshops
-
our guide can be found at our Rfun site
-
More on R -- scroll down to R Resources
-
Download data by cloning repository: https://is.gd/datafest_r
-
New Project
-
New R Notebook
- Literate Coding: brief explanation
- New Code Chunk: Ctrl+Alt+I
- R Markdown: brief explanation
library(tidyverse)
- Literate Coding: brief explanation
-
Load & View Tibble (data frame)
-
Data Structure & Data Types (brief)
-
dplyr
-- part of tidyversefilter
rowsarrange
rows by variablesselect
columnsmutate
derive cells / new variablescount
column totalssummarize
grouping reports
-
Now You Try It. Hands on exercises.
-
Basic Exploratory Data Analysis
- Read in new datasets
library(skimr)
-
More
dplyr
-- join two datasetsleft_join
to merge data
-
More Visualize with
ggvis
(syntactically simpler than ggplot2, but...)- Basic visualization (Scatter Plot, Box Plot, Histogram, Bar Chart)
- Take the ggplot2 workshop, or see the materials
- Resource: https://rfun.library.duke.edu/intro2r/visualization.html
-
Our Training Materials
-
R we having fun yet‽ https://rfun.library.duke.edu. Training materials for R.
- 2018 Workshops: Intro to 2 / Visualization / Shiny / Mapping / Git / R Markdown
-
Full DVS workshop series
-
-
Questions: Walk-in schedule and by appointment Data Science Consulting
Shareable via Creative Commons: CC-BY-NC