R TIDYVERSE EXPEDITION
R Tidyverse Expedition: Data Exploration
Cross the data lake storm! Write dplyr code to manipulate and aggregate data tables efficiently.
Mission Directive
Given the 'planets' data frame, filter the rows to keep only planets where type is 'Terrestrial' and diameter is greater than 10000. Finally, select only the name and diameter columns, saving the result in 'res'. Use the pipe operator %>% to chain operations.
Input Dataset (planets)
| name | type | diameter |
|---|---|---|
| Mercury | Terrestrial | 4879 |
| Venus | Terrestrial | 12104 |
| Earth | Terrestrial | 12756 |
| Mars | Terrestrial | 6792 |
| Jupiter | Gas Giant | 142984 |
| Saturn | Gas Giant | 120536 |
| Uranus | Ice Giant | 51118 |
| Neptune | Ice Giant | 49528 |
Expedition Flow Monitor
R PIPELINE EDITOR
Use dplyr and the pipe operator (%>% or |>) to transform data.
Loading editor…