Publications by Leo Tzang
Week12_class_exercise
# In class exercise: Generate quantity sales and percentage by bikeshop_name ## Hints: select(bikeshop_name, catogery_1, catogery_2, quantity ) library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## inter...
9 sym R (1513 sym/6 pcs)
Publish Document
library(readxl) library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union your_data <- readxl::read_excel("bike_orderlines.xlsx") result <- your_data %>% group_by(bikeshop...
9 sym R (1291 sym/6 pcs)
Document
install.packages(c("readxl", "dplyr", "ggplot2")) ## Installing packages into '/cloud/lib/x86_64-pc-linux-gnu-library/4.3' ## (as 'lib' is unspecified) library(readxl) library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:ba...
11 sym R (1403 sym/7 pcs) 1 img
11/21
library(dplyr) library(ggplot2) library(magrittr) shop_revenue <- bikeshops %>% dplyr::group_by(bikeshops.name) %>% dplyr::summarize(total_revenue = sum(revenue, na.rm = TRUE)) %>% dplyr::arrange(desc(total_revenue)) top_10 <- head(shop_revenue, 10) other_shops <- shop_revenue %>% dplyr::anti_join(top_10, by = “bikeshops.name”) %>% dplyr::summa...
725 sym
Document
# Load necessary libraries library(magrittr) library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union library(tidyr) ## ## Attaching package: 'tidyr' ## The following objec...
26 sym R (6083 sym/23 pcs)
Publish Documentmidterm
# Load necessary libraries library(magrittr) library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, setequal, union library(tidyr) ## ## Attaching package: 'tidyr' ## The following objec...
26 sym R (6083 sym/23 pcs)
期中考考試 110035145 羅暐傑
bike_order_1 <- readRDS("bike folder/bike_orderlines.rds") 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 ...
39 sym R (4433 sym/13 pcs)
Hw05_20231030
install.packages("dplyr") ## Installing package into '/cloud/lib/x86_64-pc-linux-gnu-library/4.3' ## (as 'lib' is unspecified) library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are masked from 'package:stats': ## ## filter, lag ## The following objects are masked from 'package:base': ## ## intersect, setdiff, seteq...
25 sym R (3392 sym/22 pcs)
HW2 補交 NETFLIX
R Markdown You want to learn which six actors have the most appearances in TV show. The multiple actors are listed in the cast column. Transform the data so that for each TV show, every actor has a row. Rename the column name “cast” to “actor”. library(tidyr) library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are mask...
256 sym R (945 sym/6 pcs)
HW2 補交 NETFLIX
R Markdown You want to learn which six actors have the most appearances in TV show. The multiple actors are listed in the cast column. Transform the data so that for each TV show, every actor has a row. Rename the column name “cast” to “actor”. library(tidyr) library(dplyr) ## ## Attaching package: 'dplyr' ## The following objects are mask...
256 sym R (945 sym/6 pcs)