Publications by Daniel Lee

codeapply11_g

16.11.2023

knitr::opts_chunk$set(echo = TRUE) # Load package library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.3 ✔ readr 2.1.4 ## ✔ forcats 1.0.0 ✔ stringr 1.5.0 ## ✔ ggplot2 3.4.3 ✔ tibble ...

569 sym R (4347 sym/34 pcs) 4 tbl

codeapply11

16.11.2023

knitr::opts_chunk$set(echo = TRUE) # Load package library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.3 ✔ readr 2.1.4 ## ✔ forcats 1.0.0 ✔ stringr 1.5.0 ## ✔ ggplot2 3.4.3 ✔ tibble ...

569 sym R (4337 sym/34 pcs) 4 tbl

Code Along 11

15.11.2023

Ch19 Functions Introduction Should you write a function? # For reproducible work set.seed(1234) # Create a data frame df <- tibble::tibble( a = rnorm(10), b = rnorm(10), c = rnorm(10), d = rnorm(10) ) # Rescale each column df$a <- (df$a - min(df$a, na.rm = TRUE)) / (max(df$a, na.rm = TRUE) - min(df$a, na.rm = TRUE)) df$b <- (df$b - m...

302 sym

Codealong 11

15.11.2023

Ch19 Functions Introduction When should you write a function? # For reproducible work set.seed(1234) # Creat a data frame df <- tibble::tibble( a = rnorm(10), b = rnorm(10), c = rnorm(10), d = rnorm(10) ) # Rescale each column df$a <- (df$a - min(df$a, na.rm = TRUE)) / (max(df$a, na.rm = TRUE) - min(df$a, na.rm = TRUE)) df$b <- (df$b...

291 sym

Code along 10

15.11.2023

library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.3 ✔ readr 2.1.4 ## ✔ forcats 1.0.0 ✔ stringr 1.5.0 ## ✔ ggplot2 3.4.3 ✔ tibble 3.2.1 ## ✔ lubridate 1.9.2 ✔ tidyr 1.3.0 ## ...

766 sym R (9130 sym/31 pcs) 2 img

Code along11

14.11.2023

# Load packages # Core library(tidyverse) library(tidyquant) Functions When should you write a function # For reproducible work set.seed(1234) # Create a data frame df <- tibble::tibble( a = rnorm(10), b = rnorm(10), c = rnorm(10), d = rnorm(10) ) # Rescale each column df$a <- (df$a - min(df$a, na.rm = TRUE)) / (max(df$a, na.rm = TR...

162 sym R (2491 sym/26 pcs)

Code Along 11

14.11.2023

knitr::opts_chunk$set(echo = TRUE) library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.3 ✔ readr 2.1.4 ## ✔ forcats 1.0.0 ✔ stringr 1.5.0 ## ✔ ggplot2 3.4.3 ✔ tibble 3.2.1 ## ✔ lu...

298 sym R (3511 sym/34 pcs)

Apply 10 - Jason Zink

12.11.2023

Import your data # csv file jobs_gender <- readr::read_csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-03-05/jobs_gender.csv") ## Rows: 2088 Columns: 12 ## ── Column specification ─────────────────────────────────────────�...

228 sym 2 img

CodeAlong 8

11.11.2023

# Load packages # Core library(tidyverse) library(tidyquant) Goal Measure portfolio risk using kurtosis. It describes the fatness of the tails in probability distributions. In other words, it measures whether a distribution has more or less returns in its tails than the normal distribution. It matters to investors because a distribution with exce...

809 sym R (3853 sym/16 pcs) 3 img

CodeAlong 9

11.11.2023

# Load packages # Core library(tidyverse) library(tidyquant) Goal Measure which portfolio is expected to yield a higher return adjusted for risk using the Sharpe Ratio. The Sharpe Ratio is the mean of the excess portfolio returns (returns - risk free rate) divided by the standard deviation of the excess returns. five stocks: “SPY”, “EFA”,...

600 sym R (5193 sym/18 pcs) 3 img