Publications by Daniel Lee

Document

18.09.2024

# Load Packages library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.4 ✔ readr 2.1.5 ## ✔ forcats 1.0.0 ✔ stringr 1.5.1 ## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1 ## ✔ lubridate 1.9.3 �...

142 sym R (4432 sym/12 pcs)

Apply it 3

18.09.2024

# Load Packages library(tidyverse) library(tidyquant) 1 Get stock prices and convert to returns Ra <- c("MSFT", "UBER", "NVDA") %>% tq_get(get = "stock.prices", from = "2022-01-01") %>% group_by(symbol) %>% tq_transmute(select = adjusted, mutate_fun = periodReturn, period ...

420 sym R (3145 sym/11 pcs)

Apply 3 FA

18.09.2024

# Load packages library(tidyverse) library(tidyquant) Get stock prices and convert to returns Ra <- c ("NKE", "AMZN", "MSFT") %>% tq_get(get = "stock.prices", from = "2022-01-01") %>% group_by(symbol) %>% tq_transmute(select = adjusted, mutate_fun = periodReturn, period = "monthly",...

346 sym R (3116 sym/11 pcs)

Apply 3

18.09.2024

Import data # excel file data <- read_excel("data/myData_apply2.xlsx") data ## # A tibble: 271,116 × 16 ## Column1 id name sex age height weight team noc games year season ## <dbl> <dbl> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <dbl> <chr> ## 1 270479 135289 Zzim… M 20 NA NA Braz… BRA 1952…...

34 sym 1 img

Document

18.09.2024

filter rows filter(flights, month== 1, day== 1) ## # A tibble: 842 × 19 ## year month day dep_time sched_dep_time dep_delay arr_time sched_arr_time ## <int> <int> <int> <int> <int> <dbl> <int> <int> ## 1 2013 1 1 517 515 2 830 819 ## 2 2013 1 1 ...

290 sym Python (21074 sym/52 pcs) 1 img

Apply 3 FA

17.09.2024

Import data # excel file data <- read_excel("data/myData.xlsx") data ## # A tibble: 216 × 12 ## country date_parsed weekday day month name_of_holiday date_of_holiday ## <chr> <chr> <chr> <chr> <chr> <chr> <chr> ## 1 Afghanistan 7171 Tuesday 19 Aug Afghan Indepen… 45523 ##...

34 sym Python (1304 sym/3 pcs) 1 img

Code Along 3 FA

17.09.2024

# Load packages library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.4 ✔ readr 2.1.5 ## ✔ forcats 1.0.0 ✔ stringr 1.5.1 ## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1 ## ✔ lubridate 1.9.3 ✔ ti...

134 sym R (4333 sym/12 pcs)

Code Along 3

17.09.2024

# Load packages library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.4 ✔ readr 2.1.5 ## ✔ forcats 1.0.0 ✔ stringr 1.5.1 ## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1 ## ✔ lubridate 1.9.3 �...

147 sym R (4414 sym/12 pcs)

Document

17.09.2024

{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE, message = FALSE) Coding basics R as a calculator {r} 1000/10 x <- 1000/10 #x ## assignment symbol What’s in a name? Calling functions Use of TAB {r} seq(from=1,to=10,by=1) continuation character, + {r} seq(from=1,to=10) Printing to screen {r} y<- seq(from=1,to=10) y {r} #Load Pac...

2235 sym

Code Along 3

17.09.2024

# Load packages library(tidyverse) ## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ── ## ✔ dplyr 1.1.4 ✔ readr 2.1.5 ## ✔ forcats 1.0.0 ✔ stringr 1.5.1 ## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1 ## ✔ lubridate 1.9.3 ✔ tid...

141 sym R (4622 sym/12 pcs)