Tsallaka zuwa abun ciki
Justice Tech School

Data Wrangling with dplyr

dplyr offers verbs: filter, select, mutate, arrange, group_by and summarise, chained with the pipe |>.

Example
library(dplyr)
df <- data.frame(g = c("a", "a", "b"), v = c(1, 2, 3))
df |> group_by(g) |> summarise(total = sum(v)) |> print()

Exercise

Keep matching rows.

df |> (v > 1)

Quiz Test

What is the pipe |> for?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.