R
Coding Club
This page contains all the documents, links, and information for the
monthly R
coding club held at Emory University, Atlanta. We
meet monthly and teach new coding concepts and techniques in a casual
environment. The club is half lesson half workshop style and caters for
all coding and R
levels.
Since Covid-19, the club has been virtual and all material remains online and free to distribute.
Matt Malishev, Department of Biology
Desiree de Leon, Yerkes National Primate Research
Center
Hasse Walum, Yerkes National Primate Research
Center
Emory University
Room 2052
Wayne Rollins Building
(Click on marker for room directions)
Everyone needs to have the following software and packages loaded before you come to the first session. That way, we can get straight into it.
R
from
CRAN.RStudio
Desktoptidyverse
package and then load it by
copying and pasting the following code into the Console of
RStudio
and then pressing Enter to execute
it.install.packages("tidyverse")
library(tidyverse)
The Coding Club will use the R
tidyverse suite and
packages. We will use base R
for some of the fundamentals,
with the idea of implementing tidyverse functions to learn more
versatile, reproducible, and efficient code.
We’ll also be using open-access data of
housing listings from AirBnb as our toy dataset. Once we’ve
completed the above R for Data Science exercises, we’ll
repeat the plotting exercise using these data.
We’ll be using this dataset for the rest of the club sessions, so
feel free to explore it in your own time.
This is a really big data set (it has ~50k rows !!), so it will take
a moment to run. To import the AirBnb data from the URL, copy and paste
the lines of code below in your R
console and press
Enter.
# require(readr) url <-
# 'http://data.insideairbnb.com/united-states/ny/new-york-city/2021-04-07/data/listings.csv.gz'
# nyc_full <- read_csv(url) # smaller csv file (16 cols) url <-
# 'http://data.insideairbnb.com/united-states/ny/new-york-city/2021-04-07/data/listings.csv.gz' nyc
# <- read_csv(url) nyc <- nyc[nyc$id < 1000000,] # truncate dataset head(nyc[,1:5])
If everything worked correctly, you should see the below ouput
printed in your R
console.
nyc_full
and nyc
, as we’ll be
using them regularly throughout the club sessions.