Skip to content

Replace %>% with native |> pipe operator in data-raw/df_titanic.R#9

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-style-issues-in-df-titanic
Draft

Replace %>% with native |> pipe operator in data-raw/df_titanic.R#9
Copilot wants to merge 2 commits intomainfrom
copilot/fix-style-issues-in-df-titanic

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 3, 2026

8 uses of the magrittr %>% pipe in data-raw/df_titanic.R flagged by CodeFactor, replaced with the native R |> pipe operator.

Changes:

  • data-raw/df_titanic.R: Replace all 8 %>% occurrences with |> across column renaming, filtering, and mutation chains
# Before
names(df_ship) <- names(df_ship) %>% tolower()
df <- df_ship %>% mutate(...)
df %>% filter(is.na(test)) %>% select(name)

# After
names(df_ship) <- names(df_ship) |> tolower()
df <- df_ship |> mutate(...)
df |> filter(is.na(test)) |> select(name)
Original prompt

This section details on the original issue you should resolve

<issue_title>Fix 8 Style issues in data-raw\df_titanic.R</issue_title>
<issue_description>CodeFactor found multiple issues:

Use the |> pipe operator instead of the %>% pipe operator.

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: smasongarrison <6001608+smasongarrison@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix style issues in data-raw/df_titanic.R Replace %>% with native |> pipe operator in data-raw/df_titanic.R Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix 8 Style issues in data-raw\df_titanic.R

2 participants