diff --git a/.nojekyll b/.nojekyll index 656c0fa..4a1bb1a 100644 --- a/.nojekyll +++ b/.nojekyll @@ -1 +1 @@ -a755e0de \ No newline at end of file +ae0cce19 \ No newline at end of file diff --git a/materials.html b/materials.html index e2b0361..9a7430b 100644 --- a/materials.html +++ b/materials.html @@ -235,7 +235,7 @@ }; // Store cell data -globalThis.qwebrCellDetails = [{"options":{"dpi":72,"warning":"true","fig-cap":"","fig-height":5,"out-width":"700px","comment":"","output":"true","context":"interactive","label":"unnamed-chunk-1","autorun":"false","results":"markup","fig-width":7,"read-only":"false","classes":"","out-height":"","message":"true"},"code":"\n\n","id":1}]; +globalThis.qwebrCellDetails = [{"options":{"dpi":72,"results":"markup","fig-cap":"","fig-width":7,"fig-height":5,"out-width":"700px","label":"unnamed-chunk-1","context":"interactive","warning":"true","classes":"","comment":"","autorun":"false","out-height":"","message":"true","output":"true","read-only":"false"},"code":"\n\n","id":1}]; +
+ @@ -11820,8 +11820,8 @@

Available geom layers in ggplot2

Available stat layers in ggplot2

-
- +
+
@@ -13085,10 +13085,24 @@

Attributes are for layers

Summary

+
+

ggplot2 cheatsheet

+
+
+

+
+
+

+
+
+ +

Exercise time

-

30:00

+

30:00

diff --git a/slides/slide2.html b/slides/slide2.html index 9ad76d0..8077629 100644 --- a/slides/slide2.html +++ b/slides/slide2.html @@ -7480,7 +7480,7 @@ }; // Store cell data - globalThis.qwebrCellDetails = [{"code":"library(palmerpenguins)\nggplot(penguins, aes(island)) +\n geom_bar()","id":1,"options":{"fig-height":5,"label":"unnamed-chunk-1","autorun":"false","out-height":"","warning":"true","output":"true","message":"true","read-only":"false","out-width":"700px","context":"interactive","comment":"","dpi":72,"fig-width":7,"classes":"","fig-cap":"","results":"markup"}},{"code":"penguins %>%\n # for demonstration, change 2009 to 2010\n mutate(year = case_match(year,\n 2009 ~ 2010,\n .default = year)) %>%\n ggplot(aes(x = year)) +\n geom_bar()","id":2,"options":{"fig-height":5,"label":"unnamed-chunk-2","autorun":"false","out-height":"","warning":"true","output":"true","message":"true","read-only":"false","out-width":"700px","context":"interactive","comment":"","dpi":72,"fig-width":7,"classes":"","fig-cap":"","results":"markup"}},{"code":"penguins_summary <- penguins %>% \n count(sex, species)\npenguins_summary","id":3,"options":{"fig-height":5,"label":"unnamed-chunk-3","autorun":"false","out-height":"","warning":"true","output":"true","message":"true","read-only":"false","out-width":"700px","context":"interactive","comment":"","dpi":72,"fig-width":7,"classes":"","fig-cap":"","results":"markup"}},{"code":"ggplot(penguins_summary, \n aes(x = species, y = n)) +\n geom_col() ","id":4,"options":{"fig-height":5,"label":"unnamed-chunk-4","autorun":"false","out-height":"","warning":"true","output":"true","message":"true","read-only":"false","out-width":"700px","context":"interactive","comment":"","dpi":72,"fig-width":7,"classes":"","fig-cap":"","results":"markup"}},{"code":"penguins_summary","id":5,"options":{"fig-height":5,"label":"unnamed-chunk-5","autorun":"false","out-height":"","warning":"true","output":"true","message":"true","read-only":"false","out-width":"700px","context":"interactive","comment":"","dpi":72,"fig-width":7,"classes":"","fig-cap":"","results":"markup"}},{"code":"ggplot(penguins_summary, \n aes(x = species, y = n)) +\n geom_col() ","id":6,"options":{"fig-height":5,"label":"unnamed-chunk-6","autorun":"false","out-height":"","warning":"true","output":"true","message":"true","read-only":"false","out-width":"700px","context":"interactive","comment":"","dpi":72,"fig-width":7,"classes":"","fig-cap":"","results":"markup"}},{"code":"ggplot(penguins_summary, \n aes(x = species, y = n, fill = sex)) +\n geom_col(# default position\n position = \"stack\") ","id":7,"options":{"fig-height":5,"label":"unnamed-chunk-7","autorun":"false","out-height":"","warning":"true","output":"true","message":"true","read-only":"false","out-width":"700px","context":"interactive","comment":"","dpi":72,"fig-width":7,"classes":"","fig-cap":"","results":"markup"}},{"code":"ggplot(penguins_summary,\n aes(species, n, fill = sex)) +\n geom_col(position = \"dodge\")","id":8,"options":{"fig-height":5,"label":"unnamed-chunk-8","autorun":"false","out-height":"","warning":"true","output":"true","message":"true","read-only":"false","out-width":"700px","context":"interactive","comment":"","dpi":72,"fig-width":7,"classes":"","fig-cap":"","results":"markup"}},{"code":"ggplot(penguins_summary, \n aes(species, n, fill = sex)) +\n geom_col(\n position = position_dodge(preserve = \"single\")) +\n scale_fill_discrete(drop = FALSE)","id":9,"options":{"fig-height":5,"label":"unnamed-chunk-9","autorun":"false","out-height":"","warning":"true","output":"true","message":"true","read-only":"false","out-width":"700px","context":"interactive","comment":"","dpi":72,"fig-width":7,"classes":"","fig-cap":"","results":"markup"}},{"code":"ggplot(penguins_summary, \n aes(species, n, fill = sex)) +\n geom_col(position = position_dodge2(padding = 0.1))","id":10,"options":{"fig-height":5,"label":"unnamed-chunk-10","autorun":"false","out-height":"","warning":"true","output":"true","message":"true","read-only":"false","out-width":"700px","context":"interactive","comment":"","dpi":72,"fig-width":7,"classes":"","fig-cap":"","results":"markup"}},{"code":"ggplot(penguins_summary, \n aes(species, n, fill = sex)) +\n geom_col(position = \"fill\")","id":11,"options":{"fig-height":5,"label":"unnamed-chunk-11","autorun":"false","out-height":"","warning":"true","output":"true","message":"true","read-only":"false","out-width":"700px","context":"interactive","comment":"","dpi":72,"fig-width":7,"classes":"","fig-cap":"","results":"markup"}}]; + globalThis.qwebrCellDetails = [{"id":1,"code":"library(palmerpenguins)\nggplot(penguins, aes(island)) +\n geom_bar()","options":{"message":"true","fig-height":5,"context":"interactive","fig-cap":"","label":"unnamed-chunk-1","results":"markup","output":"true","classes":"","comment":"","out-width":"700px","fig-width":7,"read-only":"false","warning":"true","autorun":"false","dpi":72,"out-height":""}},{"id":2,"code":"penguins %>%\n # for demonstration, change 2009 to 2010\n mutate(year = case_match(year,\n 2009 ~ 2010,\n .default = year)) %>%\n ggplot(aes(x = year)) +\n geom_bar()","options":{"message":"true","fig-height":5,"context":"interactive","fig-cap":"","label":"unnamed-chunk-2","results":"markup","output":"true","classes":"","comment":"","out-width":"700px","fig-width":7,"read-only":"false","warning":"true","autorun":"false","dpi":72,"out-height":""}},{"id":3,"code":"penguins_summary <- penguins %>% \n count(sex, species)\npenguins_summary","options":{"message":"true","fig-height":5,"context":"interactive","fig-cap":"","label":"unnamed-chunk-3","results":"markup","output":"true","classes":"","comment":"","out-width":"700px","fig-width":7,"read-only":"false","warning":"true","autorun":"false","dpi":72,"out-height":""}},{"id":4,"code":"ggplot(penguins_summary, \n aes(x = species, y = n)) +\n geom_col() ","options":{"message":"true","fig-height":5,"context":"interactive","fig-cap":"","label":"unnamed-chunk-4","results":"markup","output":"true","classes":"","comment":"","out-width":"700px","fig-width":7,"read-only":"false","warning":"true","autorun":"false","dpi":72,"out-height":""}},{"id":5,"code":"penguins_summary","options":{"message":"true","fig-height":5,"context":"interactive","fig-cap":"","label":"unnamed-chunk-5","results":"markup","output":"true","classes":"","comment":"","out-width":"700px","fig-width":7,"read-only":"false","warning":"true","autorun":"false","dpi":72,"out-height":""}},{"id":6,"code":"ggplot(penguins_summary, \n aes(x = species, y = n)) +\n geom_col() ","options":{"message":"true","fig-height":5,"context":"interactive","fig-cap":"","label":"unnamed-chunk-6","results":"markup","output":"true","classes":"","comment":"","out-width":"700px","fig-width":7,"read-only":"false","warning":"true","autorun":"false","dpi":72,"out-height":""}},{"id":7,"code":"ggplot(penguins_summary, \n aes(x = species, y = n, fill = sex)) +\n geom_col(# default position\n position = \"stack\") ","options":{"message":"true","fig-height":5,"context":"interactive","fig-cap":"","label":"unnamed-chunk-7","results":"markup","output":"true","classes":"","comment":"","out-width":"700px","fig-width":7,"read-only":"false","warning":"true","autorun":"false","dpi":72,"out-height":""}},{"id":8,"code":"ggplot(penguins_summary,\n aes(species, n, fill = sex)) +\n geom_col(position = \"dodge\")","options":{"message":"true","fig-height":5,"context":"interactive","fig-cap":"","label":"unnamed-chunk-8","results":"markup","output":"true","classes":"","comment":"","out-width":"700px","fig-width":7,"read-only":"false","warning":"true","autorun":"false","dpi":72,"out-height":""}},{"id":9,"code":"ggplot(penguins_summary, \n aes(species, n, fill = sex)) +\n geom_col(\n position = position_dodge(preserve = \"single\")) +\n scale_fill_discrete(drop = FALSE)","options":{"message":"true","fig-height":5,"context":"interactive","fig-cap":"","label":"unnamed-chunk-9","results":"markup","output":"true","classes":"","comment":"","out-width":"700px","fig-width":7,"read-only":"false","warning":"true","autorun":"false","dpi":72,"out-height":""}},{"id":10,"code":"ggplot(penguins_summary, \n aes(species, n, fill = sex)) +\n geom_col(position = position_dodge2(padding = 0.1))","options":{"message":"true","fig-height":5,"context":"interactive","fig-cap":"","label":"unnamed-chunk-10","results":"markup","output":"true","classes":"","comment":"","out-width":"700px","fig-width":7,"read-only":"false","warning":"true","autorun":"false","dpi":72,"out-height":""}},{"id":11,"code":"ggplot(penguins_summary, \n aes(species, n, fill = sex)) +\n geom_col(position = \"fill\")","options":{"message":"true","fig-height":5,"context":"interactive","fig-cap":"","label":"unnamed-chunk-11","results":"markup","output":"true","classes":"","comment":"","out-width":"700px","fig-width":7,"read-only":"false","warning":"true","autorun":"false","dpi":72,"out-height":""}}];