Publications by Jacob Martin

DS 2870 - Module 5 - Creating Bar Charts from Summarized Data

12.09.2023

Set Up Your Project and Load Libraries knitr::opts_chunk$set(echo = TRUE, fig.align = "center") ## Load the libraries we will be using pacman::p_load(tidyverse, ggfittext) ## Since we're creating bar charts, let's use theme_test() theme_set(theme_test()) # Changing the default theme setting to have the title centered...

4527 sym 6 img

DS 2870: Module 3 - Histograms and Density Plots

12.09.2023

Set Up Your Project and Load Libraries ## Set the default size of figures and default to printing the R code knitr::opts_chunk$set(echo = F, fig.width=8, fig.height=5) ## Load the libraries we will be using pacman::p_load(tidyverse, skimr) ## Changing the default theme to black/white instead o...

5096 sym 16 img

DS 2870 - Intro to ggplot2 package

11.09.2023

Setup knitr::opts_chunk$set(echo = TRUE) # Install the tidyverse package, if you didn't already. # Only install it once, like this: # Go to bottom right pane, click Packages, # then click Install, then type tidyverse # in the blank in the middle, click Install. # If you have problems with the tidyverse, install and load ggplot2 ins...

7420 sym 15 img

DS 2870 - Creating Bar Charts

11.09.2023

Set Up Your Project and Load Libraries ## Set the default size of figures and default to printing the R code knitr::opts_chunk$set(fig.align = "center", echo = F, include = T) ## Load the libraries we will be using pacman::p_load(tidyverse, skimr) ## Changing the default theme to black/white ins...

9465 sym 12 img 2 tbl

DS 2870 - Strava Line Graphs

11.09.2023

Data Cleaning/Prep We will start by doing a little data cleaning to get the data in a form we’ll need it in for this example. You might not have seen these tools before. Don’t worry, you’re not expected to at this time, but you’ll have seen as least most of these by the end of the semester! Data description The bike_full data set has 8 ...

4822 sym 7 img

DS 2870 Using Packages

08.09.2023

Installing packages Loading Packages Packages in R: Getting Additional Content Jacob Martin DS 187 Installing packages Some functions, datasets, and tools we will be using don’t come with the default R experience. We need some DLC to access the extra tools we need. These extra tools are stored in what R calls packages, which you can ge...

2551 sym 2 img

DS 0870 - My First Rmarkdown Script

08.09.2023

What we are currently looking at is called an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com. When you click the Knit button a document will be generated that includes both content as well as the output of any embed...

4338 sym

DS 2870 Working with Functions in R

08.09.2023

Functions and Arguments NA: The Missing Value Getting Help inside RStudio Functions in R Jacob Martin STAT 187 Same setup chunk as before Functions and Arguments Functions In the previous Rmarkdown file, we looked at creating and saving objects, either alone or in a vector. This document will focus on functions....

7169 sym Python (1854 sym/56 pcs) 2 img

DS 2870 - Pipes in R

08.09.2023

Multiple Steps and Nested Functions Let’s say we want to use R to find the following: \[\sqrt{ | \log_{10}{0.75} |}\] and round the result to two decimal places. How can we achieve that? Step-by-step we need to: Find the log of 0.75 Take the absolute value Square root the result Round the answer to 2 decimal places How would that look in R? Ho...

2466 sym Python (1241 sym/8 pcs) 2 img 1 tbl