# A tibble: 1 × 17
gen pokedex_no img_link name variant type1 type2 total hp attack defense
<dbl> <dbl> <chr> <chr> <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl>
1 8 812 https:/… Rill… <NA> Grass <NA> 530 100 125 90
# ℹ 6 more variables: sp_attack <dbl>, sp_defense <dbl>, speed <dbl>,
# species <chr>, height_m <dbl>, weight_kg <dbl>
Select
Using poke_types, get only columns matching any of the following criteria:
columns starting with t
the 9th column
the pokemon name
poke_types |>select(starts_with("t"), 9, name)
# A tibble: 1,526 × 5
type1 type2 total hp name
<chr> <chr> <dbl> <dbl> <chr>
1 Grass Poison 318 45 Bulbasaur
2 Grass Poison 405 60 Ivysaur
3 Grass Poison 525 80 Venusaur
4 Grass Poison 625 80 Venusaur
5 Fire <NA> 309 39 Charmander
6 Fire <NA> 405 58 Charmeleon
7 Fire Flying 534 78 Charizard
8 Fire Dragon 634 78 Charizard
9 Fire Flying 634 78 Charizard
10 Water <NA> 314 44 Squirtle
# ℹ 1,516 more rows
Mutate
Create a column named n_elevator that calculates how many of these pokemon could fit in an elevator with a weight limit of 6000 lbs. You may assume that pokemon can be infinitely compressed, so that the volume of the pokemon is not a concern.
Round your answer down to the nearest integer with the floor() function - no one needs to get hurt!
Remember, you will need to convert kg to lbs, so you may want to create an additional column named weight_lbs.
Output only gen, name, and the columns you created.