Load packages
library(tidyverse)
library(datasauRus)
Exercise 1
- The datasaurus_dozen dataset has 1846 rows and 3 columns.
- The variables are: dataset, x, y
Exercise 2
First let’s plot the data in the dino dataset:

And next calculate the correlation between x
and y
in this dataset:
Exercise 3
Blah blah blah…

ok
Exercise 4

Exercise 5
ggplot(datasaurus_dozen, aes(x = x, y = y, color = dataset))+
geom_point()+
facet_wrap(~ dataset, ncol = 3) +
theme(legend.position = "none")

LS0tCnRpdGxlOiAiTGFiIDAxIC0gSGVsbG8gUiIKYXV0aG9yOiAiU3R1ZGVudCBOYW1lIgpkYXRlOiAiMS8xOS8yMDE4IgpvdXRwdXQ6CiAgaHRtbF9ub3RlYm9vazoKICAgIGZpZ19oZWlnaHQ6IDQKICAgIGZpZ193aWR0aDogNgogICAgbnVtYmVyX3NlY3Rpb25zOiB5ZXMKICAgIHRoZW1lOiBwYXBlcgogICAgdG9jOiB5ZXMKLS0tCgojIyMgTG9hZCBwYWNrYWdlcwoKYGBge3IgbG9hZC1wYWNrYWdlcywgbWVzc2FnZT1GQUxTRX0KbGlicmFyeSh0aWR5dmVyc2UpIApsaWJyYXJ5KGRhdGFzYXVSdXMpCmBgYAoKCiMjIyBFeGVyY2lzZSAxCgotIFRoZSBkYXRhc2F1cnVzX2RvemVuIGRhdGFzZXQgaGFzIDE4NDYgcm93cyBhbmQgMyBjb2x1bW5zLgotIFRoZSB2YXJpYWJsZXMgYXJlOiBkYXRhc2V0LCB4LCB5CgojIyMgRXhlcmNpc2UgMgoKRmlyc3QgbGV0J3MgcGxvdCB0aGUgZGF0YSBpbiB0aGUgZGlubyBkYXRhc2V0OgoKYGBge3IgcGxvdC1kaW5vLCBmaWcuaGVpZ2h0PTMsIGZpZy53aWR0aD02fQpkaW5vX2RhdGEgPC0gZGF0YXNhdXJ1c19kb3plbiAlPiUKICBmaWx0ZXIoZGF0YXNldCA9PSAiZGlubyIpCgpnZ3Bsb3QoZGF0YSA9IGRpbm9fZGF0YSwgbWFwcGluZyA9IGFlc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