```r
filtered_data <- starwars %>%
  filter(gender %in% c("female", "male"))

ggplot(filtered_data) +
  geom_density(aes(height, fill = gender))
```

```
## Warning: Removed 5 rows containing non-finite values (stat_density).
```

<img src="modern_R_files/figure-html/unnamed-chunk-381-1.png" width="672" />