Publications by Kitada Smalley
Introduction to Working with Data in R
Learning Objectives: In this session students will learn the basics of the R programming environment and how to work with data sets through an experimental design case study. How to install a package: install.packages() How to call a library: library() How to use a data set built into R: data() Where to find help with R functions and object: hel...
2695 sym R (2489 sym/24 pcs) 3 img
DATA151: Basics of Programming
Learning Objective: In this session students will learn how to create an R markdown document that basics of programming through a case study of creating a randomized experiment. How to create an R Markdown document: .Rmd Creating headers at different levels to organize and navigate the document Creating and working with code chunks Basics of p...
5242 sym Python (3818 sym/38 pcs)
DataViz: Geometries
Part I: Review geom_point 0. Basics Recall our work from last class with using geom_point: Load example data library(tidyverse) data("diamonds") str(diamonds) ## tibble [53,940 × 10] (S3: tbl_df/tbl/data.frame) ## $ carat : num [1:53940] 0.23 0.21 0.23 0.29 0.31 0.24 0.24 0.26 0.22 0.23 ... ## $ cut : Ord.factor w/ 5 levels "Fair"<"Good"...
1277 sym R (4044 sym/40 pcs) 26 img
DataViz: Bars
Content Reference: This lab reference practice problems from “R for Data Science” - Chapter 3: Data Visualisation https://r4ds.had.co.nz/data-visualisation.html In this lab we will discuss and apply: Position Adjustments (for bars) Geometric Objects Example 1: Diamonds First, call the tidyverse package library(tidyverse) The diamonds datas...
2458 sym R (2549 sym/17 pcs) 8 img
DATA151: dplyr Verbs
Learning Objectives In this session students will learn the basics of working with dplyr verbs from the tidyverse as well as employ the pipe operator %>%. Use the piping operator %>% in your code to improve readability Employ dplyr Verbs filter() count() arrange() group_by and summarise() select() mutate() You will need to start by calling the...
4166 sym R (10866 sym/40 pcs)
DataViz: Sample Solutions
Useful Packages library(ggplot2) library(dplyr) library(tidyr) library(tidyverse) library(esquisse) library(scales) library(janitor) library(lubridate) library(stringr) Board Games board_games<-readr::read_csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-03-12/board_games.csv") ## Rows: 10532 Columns: 22 #...
120 sym R (7748 sym/27 pcs) 4 img
DATA151: Tidyr and Joins
Learning Objectives In this lesson students will gain more practice with the tidyverse with a particular focus on wrangling the tidyr package. This lesson covers: tidyr Package gather() spread() unite() separate() Joins: left_join, inner_join, right_join Before you start you will need to load the tidyverse library(tidyverse) PART I: tidyr D...
1808 sym R (14956 sym/62 pcs) 7 img
DATA151: Tidyr and Joins
Learning Objectives In this lesson students will gain more practice with the tidyverse with a particular focus on wrangling the tidyr package. This lesson covers: tidyr Package gather() spread() unite() separate() Joins: left_join, inner_join, right_join Before you start you will need to load the tidyverse library(tidyverse) PART I: tidyr D...
3019 sym R (14571 sym/63 pcs) 7 img
Diamond Drill Solutions
Diamonds Are Forever Load the package library(tidyverse) Learn about the data data("diamonds") ## INSERT YOUR CODE HERE ## Question 1 Make a new data set that has the average depth and price of the diamonds in the data set. q1<-diamonds%>% summarise(avgD=mean(depth, na.rm=TRUE), avgP=mean(price, na.rm=TRUE)) q1 ## # A tibble: 1...
1236 sym R (3387 sym/21 pcs)
DATA151: Tables and Bars
Learning Objectives In this lesson students will learn to apply categorical data analysis methods to data sets with fundamentally different structures. Work with cross-tabulated data Work with individual level raw data Create univarite tables to show marginal distributions Create two-way tables to show joint and conditional distributions Create ...
4069 sym R (8061 sym/63 pcs) 19 img