Skip to main content

mutate01

datawrangling
eda
tidyverse
dplyr
num
computer
Published

March 27, 2023

Im Datensatz mariokart:

Erzeugen Sie eine Spalte zu_teuer, die folgende Prüfung durchführt: total_pr > 100.











Pakete starten:

library(easystats)
## # Attaching packages: easystats 0.7.6.3 (red = needs update)
## ✖ bayestestR  0.19.0   ✔ correlation 0.8.8 
## ✖ datawizard  1.4.0    ✔ effectsize  1.0.3 
## ✖ insight     1.5.4    ✖ modelbased  0.17.0
## ✖ performance 0.18.2   ✖ parameters  0.29.3
## ✔ report      0.6.4    ✖ see         0.14.2
## 
## Restart the R-Session and update packages with `easystats::easystats_update()`.
library(tidyverse)  # startet das Paket tidyverse

Daten importieren:

mariokart <- data_read("https://vincentarelbundock.github.io/Rdatasets/csv/openintro/mariokart.csv")
mariokart <- 
  mutate(mariokart, zu_teuer = total_pr > 100)

mariokart2 <-
  select(mariokart, total_pr, zu_teuer)

head(mariokart2)
total_pr zu_teuer
51.55 FALSE
37.04 FALSE
45.50 FALSE
44.00 FALSE
71.00 FALSE
45.00 FALSE

Aufgabenname: mutate01


Categories:

  • datawrangling
  • eda
  • tidyverse
  • dplyr
  • num