From 6141dc340a9305b238b6960e95630365e161b83d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Mar 2026 19:54:40 +0000 Subject: [PATCH 1/2] Initial plan From 1a3506643b42e864e3f246cb43c3487d1a29719c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 3 Mar 2026 19:55:48 +0000 Subject: [PATCH 2/2] Replace %>% with |> in data-raw/df_titanic.R Co-authored-by: smasongarrison <6001608+smasongarrison@users.noreply.github.com> --- data-raw/df_titanic.R | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/data-raw/df_titanic.R b/data-raw/df_titanic.R index e0e7371..bbcb7ca 100644 --- a/data-raw/df_titanic.R +++ b/data-raw/df_titanic.R @@ -18,20 +18,20 @@ data("titanic_train") data("titanic_test") # Rename columns to lowercase -names(df_ship) <- names(df_ship) %>% tolower() -names(titanic_train) <- names(titanic_train) %>% tolower() -names(titanic_test) <- names(titanic_test) %>% tolower() +names(df_ship) <- names(df_ship) |> tolower() +names(titanic_train) <- names(titanic_train) |> tolower() +names(titanic_test) <- names(titanic_test) |> tolower() # Check for overlapping names between datasets -df_ship %>% +df_ship |> filter(tolower(name) %in% tolower(titanic_train$name) & - tolower(name) %in% tolower(titanic_test$name)) %>% + tolower(name) %in% tolower(titanic_test$name)) |> select(name) # Create a variable to identify which dataset each row belongs to trimms <- '["\\\\\\(\\)\\s]' -df <- df_ship %>% +df <- df_ship |> mutate( name = str_remove_all(name, '"'), test = case_when( # there are two Kelly, Mr. James and Connolly, Miss. Kate @@ -47,8 +47,8 @@ summary(df$test) sum(df$test == 0, na.rm = TRUE) # 891 sum(df$test == 1, na.rm = TRUE) # 418 -df %>% - filter(is.na(test)) %>% +df |> + filter(is.na(test)) |> select(name) titanic_passengers <- df