Skip to content

Instantly share code, notes, and snippets.

View nhatley's full-sized avatar

Nick Hatley nhatley

  • Washington, D.C.
View GitHub Profile
#code from start to finish
##install or update packages if neccessary
#install.packages("tidyverse")
#install.packages("haven")
##load packages in
library(tidyverse) #loads all "core" tidyverse packages like dplyr, tidyr, forcats, and ggplot2
library(haven)
## challenge from: https://twitter.com/brookLYNevery1/status/1204208310158794753
library(tidyverse)
starwars_garbage_data1 <- data.frame(
stringsAsFactors = FALSE,
v1 = c(
"Character Name", "C-3PO", "Person-film ID", "2218529825", "7731900678",
"123598423", "238952395", "6232048034", "3036308047",
"Species:", "Character Name", "Darth Vader", "Person-film ID",
## RWorkshop 2020 snippets
## name: rws_enter_project
## what it does: use usethis::proj_activate to enter the project
snippet rws_enter_project
usethis::proj_activate("/shared/workshop/2020/")
## name: rws_install_packages
## what it does: installs all packages you need for the workshop
snippet rws_install_packages