Liefern Sie einen visuellen Überblick über fehlende Werte im Datensatz penguins!
155.0.1 Setup
library(tidyverse)
d_path <- "https://vincentarelbundock.github.io/Rdatasets/csv/palmerpenguins/penguins.csv"
d <- read_csv(d_path)
## Rows: 344 Columns: 9
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (3): species, island, sex
## dbl (6): rownames, bill_length_mm, bill_depth_mm, flipper_length_mm, body_ma...
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
nrow(d)
## [1] 344
155.0.2 Weg 1
library(visdat)
vis_dat(d)
155.0.3 Weg 2
d_na_only <-
d %>%
rowwise() %>%
mutate(na_n = sum(is.na(cur_data()))) %>%
ungroup()
d_na_only %>%
ggplot(aes(x = na_n)) +
geom_bar()
Aufgabenname: filter-na4
Categories:
- 2023
- eda
- na
- string