<- "https://raw.githubusercontent.com/sebastiansauer/Lehre/main/data/tidy-table1.csv"
table1_path <- read_csv(table1_path) table1
tidydata1
datawrangling
tidy
schoice
Aufgabe
Laden Sie die folgende Tabellen mit folgendem Befehl aus dem Paket tidyverse
:
Insgesamt sollten Sie als folgende Tabellen in Ihrem environment
verfügbar haben:
- table1
- table2
- table3
- table4
- table5
Welche der Tabellen ist in der Normalform?
Answerlist
- table1
- table2
- table3
- table4
- table5
Lösung
Laden wir noch die übrigen Tabellen
<- "https://raw.githubusercontent.com/sebastiansauer/Lehre/main/data/tidy-table2.csv"
table2_path <- read_csv(table2_path)
table2
<- "https://raw.githubusercontent.com/sebastiansauer/Lehre/main/data/tidy-table3.csv"
table3_path <- read_csv(table3_path)
table3
<- "https://raw.githubusercontent.com/sebastiansauer/Lehre/main/data/tidy-table4.csv"
table4_path <- read_csv(table4_path)
table4
<- "https://raw.githubusercontent.com/sebastiansauer/Lehre/main/data/tidy-table5.csv"
table5_path <- read_csv(table5_path) table5
Betrachten wir alle fünf Tabellen:
table1
country | year | cases | population |
---|---|---|---|
Afghanistan | 1999 | 745 | 19987071 |
Afghanistan | 2000 | 2666 | 20595360 |
Brazil | 1999 | 37737 | 172006362 |
Brazil | 2000 | 80488 | 174504898 |
China | 1999 | 212258 | 1272915272 |
China | 2000 | 213766 | 1280428583 |
table2
country | year | type | count |
---|---|---|---|
Afghanistan | 1999 | cases | 745 |
Afghanistan | 1999 | population | 19987071 |
Afghanistan | 2000 | cases | 2666 |
Afghanistan | 2000 | population | 20595360 |
Brazil | 1999 | cases | 37737 |
Brazil | 1999 | population | 172006362 |
Brazil | 2000 | cases | 80488 |
Brazil | 2000 | population | 174504898 |
China | 1999 | cases | 212258 |
China | 1999 | population | 1272915272 |
China | 2000 | cases | 213766 |
China | 2000 | population | 1280428583 |
table3
country | year | rate |
---|---|---|
Afghanistan | 1999 | 745/19987071 |
Afghanistan | 2000 | 2666/20595360 |
Brazil | 1999 | 37737/172006362 |
Brazil | 2000 | 80488/174504898 |
China | 1999 | 212258/1272915272 |
China | 2000 | 213766/1280428583 |
table4
country | 1999 | 2000 |
---|---|---|
Afghanistan | 745 | 2666 |
Brazil | 37737 | 80488 |
China | 212258 | 213766 |
table5
country | century | year | rate |
---|---|---|---|
Afghanistan | 19 | 99 | 745/19987071 |
Afghanistan | 20 | 00 | 2666/20595360 |
Brazil | 19 | 99 | 37737/172006362 |
Brazil | 20 | 00 | 80488/174504898 |
China | 19 | 99 | 212258/1272915272 |
China | 20 | 00 | 213766/1280428583 |
Man sieht, dass nur Tabelle 1 “tidy” ist.
Answerlist
- Wahr
- Falsch
- Falsch
- Falsch
- Falsch
Categories:
- datawrangling
- tidy
- schoice