Adjust the YAML each week when doing a new exercise
Author
Sadaf Salehi
Published
June 24, 2026
Assignment. Add assignment details here. Update this section with the current week’s tasks or instructions, and any additional resources to complete the assignment.
Introduction to dplyr
library(dplyr)starwars |>mutate(name, bmi = mass / ((height /100)^2)) |>select(name:mass, bmi)
# A tibble: 87 × 4
name height mass bmi
<chr> <int> <dbl> <dbl>
1 Luke Skywalker 172 77 26.0
2 C-3PO 167 75 26.9
3 R2-D2 96 32 34.7
4 Darth Vader 202 136 33.3
5 Leia Organa 150 49 21.8
6 Owen Lars 178 120 37.9
7 Beru Whitesun Lars 165 75 27.5
8 R5-D4 97 32 34.0
9 Biggs Darklighter 183 84 25.1
10 Obi-Wan Kenobi 182 77 23.2
# ℹ 77 more rows