Publications by Kenton Quaglieri
Document
Import your data Coaster <- read_excel("../00_data/MyData.xlsx") data ## function (..., list = character(), package = NULL, lib.loc = NULL, ## verbose = getOption("verbose"), envir = .GlobalEnv, overwrite = TRUE) ## { ## fileExt <- function(x) { ## db <- grepl("\\.[^.]+\\.(gz|bz2|xz)$", x) ## ans <- sub(".*\\.", "",...
290 sym R (9986 sym/14 pcs) 2 img
Document
Chapter 15 Factors Introduction Creating factors General social survey gss_cat ## # A tibble: 21,483 × 9 ## year marital age race rincome partyid relig denom tvhours ## <int> <fct> <int> <fct> <fct> <fct> <fct> <fct> <int> ## 1 2000 Never married 26 White $8000 to 9999 Ind,near … Prot...
463 sym Python (7892 sym/47 pcs) 4 img
Document
Import your data Coaster <- read_excel("../00_data/MyData.xlsx") data ## function (..., list = character(), package = NULL, lib.loc = NULL, ## verbose = getOption("verbose"), envir = .GlobalEnv, overwrite = TRUE) ## { ## fileExt <- function(x) { ## db <- grepl("\\.[^.]+\\.(gz|bz2|xz)$", x) ## ans <- sub(".*\\.", "",...
111 sym R (10843 sym/13 pcs)
Document
Introduction String basics chac_data <- "I'm 'very' hungry" stringr::str_length("I am hungry.") ## [1] 12 stringr::str_c(c("I", " am"), collapse = "") ## [1] "I am" stringr::str_c("I", " am", sep = ";") ## [1] "I; am" str_sort(c("John","Mary", "Aaron")) ## [1] "Aaron" "John" "Mary" matching patterns with regular expressions flights %>% glimpse...
361 sym
Document
1. Import your data Import two related datasets from TidyTuesday Project. game_goals <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-03-03/game_goals.csv') ## Rows: 49384 Columns: 25 ## ── Column specification ──────────────────────────�...
1049 sym
CodeAlong8
Introduction NYCflights13 Keys Mutating joins inner joins x <- tribble( ~key, ~val_x, 1, "x1", 2, "x2", 3, "x3" ) y <- tribble( ~key, ~val_y, 1, "y1", 2, "y2", 4, "y3" ) inner_join(x, y) ## Joining with `by = join_by(key)` ## # A tibble: 2 × 3 ## key val_x val_y ## <dbl> <chr> <chr> ## 1 ...
202 sym Python (5206 sym/40 pcs)
Document
Import your data Coaster <- read_excel("../00_data/MyData.xlsx") data ## function (..., list = character(), package = NULL, lib.loc = NULL, ## verbose = getOption("verbose"), envir = .GlobalEnv, overwrite = TRUE) ## { ## fileExt <- function(x) { ## db <- grepl("\\.[^.]+\\.(gz|bz2|xz)$", x) ## ans <- sub(".*\\.", "",...
166 sym R (11252 sym/11 pcs)
Document
Tidy Data Piviting Long to wide form table4a_long <- table4a %>% pivot_longer(cols = c( '1999' , '2000'), names_to = "year", values_to = "cases") Wide to Long form table4a_long %>% pivot_wider(names_from = year, values_from = cases) ## # A tibble: 3 × 3 ## country `1999` ...
181 sym Python (2689 sym/16 pcs)
Apply 6
excel file Introduction Questions Variation Visualizing distributions ## Warning: Removed 684 rows containing non-finite values (`stat_bin()`). Typical values Unusual value ## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`. ## Warning: Removed 2 rows containing non-finite values (`stat_bin()`). ## `stat_bin()` using `bins...
333 sym 10 img
Document
Introduction Question 2 Variation Visualizing distributions diamonds %>% ggplot(aes(x = cut)) + geom_bar() diamonds %>% ggplot(mapping = aes(x = carat)) + geom_histogram(binwidth = 0.5) diamonds %>% filter(carat < 3) %>% ggplot(aes(x = carat)) + geom_histogram(binwidth = 0.5) diamonds %>% ggplot(aes(x...
290 sym R (2005 sym/23 pcs) 15 img