This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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) |