diff --git a/.nojekyll b/.nojekyll index d934bd2..d47fb70 100644 --- a/.nojekyll +++ b/.nojekyll @@ -1 +1 @@ -ca9edca4 \ No newline at end of file +be29ebca \ No newline at end of file diff --git a/materials.html b/materials.html index e35a972..86a2179 100644 --- a/materials.html +++ b/materials.html @@ -235,7 +235,7 @@ }; // Store cell data -globalThis.qwebrCellDetails = [{"code":"data(crampton.pig, package = \"agridat\")\nstr(crampton.pig)","id":1,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-1","read-only":"false","results":"markup","fig-cap":"","autorun":"true","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}},{"code":"ggplot(crampton.pig, aes(___)) + \n geom_density() ","id":2,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-2","read-only":"false","results":"markup","fig-cap":"","autorun":"false","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}},{"code":"ggplot(crampton.pig, aes(___)) + \n geom____() ","id":3,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-3","read-only":"false","results":"markup","fig-cap":"","autorun":"false","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}},{"code":"ggplot(crampton.pig, aes(___, ___, color = ___, size = ___)) + \n geom____()","id":4,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-4","read-only":"false","results":"markup","fig-cap":"","autorun":"false","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}},{"code":"ggplot(crampton.pig, aes(___, ___, fill = ___)) + \n geom_tile(color = \"black\", linewidth = 2)","id":5,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-5","read-only":"false","results":"markup","fig-cap":"","autorun":"false","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}},{"code":"pigdata <- crampton.pig |> \n # make id for each pig\n mutate(pig = 1:n()) |> \n rename(initial = weight1,\n final = weight2) |> \n # reshape data\n ___ |> \n # change the order of the levels\n mutate(period = factor(period, levels = c(\"initial\", \"final\"))\n\nggplot(pigdata, aes(___, ___, group = pig, color = ___)) +\n geom_line()","id":6,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-6","read-only":"false","results":"markup","fig-cap":"","autorun":"false","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}},{"code":"str(diamonds)","id":7,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-7","read-only":"false","results":"markup","fig-cap":"","autorun":"true","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}},{"code":"ggplot(diamonds, aes(___)) + \n geom____() ","id":8,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-8","read-only":"false","results":"markup","fig-cap":"","autorun":"false","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}},{"code":"ggplot(diamonds, aes(___)) + \n geom____(___ = 1) ","id":9,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-9","read-only":"false","results":"markup","fig-cap":"","autorun":"false","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}},{"code":"ggplot(diamonds, aes(___, ___, fill = ___)) + \n geom____()","id":10,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-10","read-only":"false","results":"markup","fig-cap":"","autorun":"false","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}},{"code":"ggplot(heart2, aes(___, ___)) + \n geom_density_2d_filled()","id":11,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-11","read-only":"false","results":"markup","fig-cap":"","autorun":"false","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}},{"code":"ggplot(diamonds, aes(___, ___)) + \n geom____()","id":12,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-12","read-only":"false","results":"markup","fig-cap":"","autorun":"false","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}},{"code":"data(welch.bermudagrass, package = \"agridat\")\nstr(welch.bermudagrass)","id":13,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-13","read-only":"false","results":"markup","fig-cap":"","autorun":"true","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}},{"code":"ggplot(welch.bermudagrass, aes(___)) + \n geom____(alpha = 0.2)","id":14,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-14","read-only":"false","results":"markup","fig-cap":"","autorun":"false","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}},{"code":"ggplot(welch.bermudagrass, aes(___)) + \n geom____(alpha = 0.2, \n aes(___)) ","id":15,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-15","read-only":"false","results":"markup","fig-cap":"","autorun":"false","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}},{"code":"ggplot(welch.bermudagrass, aes(___)) + \n geom____(alpha = 0.2, ___) ","id":16,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-16","read-only":"false","results":"markup","fig-cap":"","autorun":"false","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}},{"code":"ggplot(welch.bermudagrass, aes(___)) + \n geom____(alpha = 0.2, ___) ","id":17,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-17","read-only":"false","results":"markup","fig-cap":"","autorun":"false","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}},{"code":"data(scurvy, package = \"medicaldata\")\nstr(scurvy)","id":18,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-18","read-only":"false","results":"markup","fig-cap":"","autorun":"true","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}},{"code":"ggplot(scurvy, aes(___, fill = ___)) + \n geom____()","id":19,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-19","read-only":"false","results":"markup","fig-cap":"","autorun":"false","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}},{"code":"ggplot(scurvy, aes(___, fill = ___)) + \n geom____(position = position_dodge2(preserve = ___))","id":20,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-20","read-only":"false","results":"markup","fig-cap":"","autorun":"false","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}},{"code":"ggplot(scurvy, aes(___, fill = ___)) + \n geom____(position = ___)","id":21,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-21","read-only":"false","results":"markup","fig-cap":"","autorun":"false","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}},{"code":"ggplot(scurvy, aes(___, fill = ___)) + \n geom____(position = ___) +\n coord____","id":22,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-22","read-only":"false","results":"markup","fig-cap":"","autorun":"false","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}},{"code":"data(nass.wheat, package = \"agridat\")\ndata(nass.corn, package = \"agridat\")\ndata(nass.soybean, package = \"agridat\")\n\nstr(nass.wheat)\nstr(nass.corn)\nstr(nass.soybean)","id":23,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-23","read-only":"false","results":"markup","fig-cap":"","autorun":"true","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}},{"code":"crops_data <- ___\n\nggplot(crops_data, aes(___, ___)) + \n geom____() + \n geom____(width = 0.1)","id":24,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-24","read-only":"false","results":"markup","fig-cap":"","autorun":"false","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}},{"code":"wheat2011_data <- nass.wheat |> \n ___(year == 2011) \n\nhighlight <- function(.data) filter(.data, acres > 4000000 | yield > 80)\n\nggplot(wheat2011_data, aes(___, yield)) + \n ___() + \n ___(data = ___, color = \"red\") + \n geom_text(___)","id":25,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-25","read-only":"false","results":"markup","fig-cap":"","autorun":"false","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}},{"code":"wheat2011_data_with_map <- nass.wheat |> \n filter(year == 2011) |> \n mutate(region = tolower(state)) |> \n right_join(map_data(\"state\"), by = \"region\")\n\nggplot(wheat2011_data_with_map, aes(___, ___)) + \n geom_polygon(aes(___), color = \"black\") +\n ___(\"label\", x = -120, y = 27, label = \"2011\", size = 8)","id":26,"options":{"message":"true","comment":"","context":"interactive","warning":"true","output":"true","label":"unnamed-chunk-26","read-only":"false","results":"markup","fig-cap":"","autorun":"false","fig-height":5,"classes":"","out-width":"700px","out-height":"","dpi":72,"fig-width":7}}]; +globalThis.qwebrCellDetails = [{"id":1,"code":"data(crampton.pig, package = \"agridat\")\nstr(crampton.pig)","options":{"autorun":"true","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-1","warning":"true","message":"true"}},{"id":2,"code":"ggplot(crampton.pig, aes(___)) + \n geom_density() ","options":{"autorun":"false","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-2","warning":"true","message":"true"}},{"id":3,"code":"ggplot(crampton.pig, aes(___)) + \n geom____() ","options":{"autorun":"false","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-3","warning":"true","message":"true"}},{"id":4,"code":"ggplot(crampton.pig, aes(___, ___, color = ___, size = ___)) + \n geom____()","options":{"autorun":"false","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-4","warning":"true","message":"true"}},{"id":5,"code":"ggplot(crampton.pig, aes(___, ___, fill = ___)) + \n geom_tile(color = \"black\", linewidth = 2)","options":{"autorun":"false","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-5","warning":"true","message":"true"}},{"id":6,"code":"pigdata <- crampton.pig |> \n # make id for each pig\n mutate(pig = 1:n()) |> \n rename(initial = weight1,\n final = weight2) |> \n # reshape data\n ___ |> \n # change the order of the levels\n mutate(period = factor(period, levels = c(\"initial\", \"final\"))\n\nggplot(pigdata, aes(___, ___, group = pig, color = ___)) +\n geom_line()","options":{"autorun":"false","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-6","warning":"true","message":"true"}},{"id":7,"code":"str(diamonds)","options":{"autorun":"true","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-7","warning":"true","message":"true"}},{"id":8,"code":"ggplot(diamonds, aes(___)) + \n geom____() ","options":{"autorun":"false","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-8","warning":"true","message":"true"}},{"id":9,"code":"ggplot(diamonds, aes(___)) + \n geom____(___ = 1) ","options":{"autorun":"false","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-9","warning":"true","message":"true"}},{"id":10,"code":"ggplot(diamonds, aes(___, ___, fill = ___)) + \n geom____()","options":{"autorun":"false","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-10","warning":"true","message":"true"}},{"id":11,"code":"ggplot(heart2, aes(___, ___)) + \n geom_density_2d_filled()","options":{"autorun":"false","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-11","warning":"true","message":"true"}},{"id":12,"code":"ggplot(diamonds, aes(___, ___)) + \n geom____()","options":{"autorun":"false","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-12","warning":"true","message":"true"}},{"id":13,"code":"data(welch.bermudagrass, package = \"agridat\")\nstr(welch.bermudagrass)","options":{"autorun":"true","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-13","warning":"true","message":"true"}},{"id":14,"code":"ggplot(welch.bermudagrass, aes(___)) + \n geom____(alpha = 0.2)","options":{"autorun":"false","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-14","warning":"true","message":"true"}},{"id":15,"code":"ggplot(welch.bermudagrass, aes(___)) + \n geom____(alpha = 0.2, \n aes(___)) ","options":{"autorun":"false","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-15","warning":"true","message":"true"}},{"id":16,"code":"ggplot(welch.bermudagrass, aes(___)) + \n geom____(alpha = 0.2, ___) ","options":{"autorun":"false","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-16","warning":"true","message":"true"}},{"id":17,"code":"ggplot(welch.bermudagrass, aes(___)) + \n geom____(alpha = 0.2, ___) ","options":{"autorun":"false","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-17","warning":"true","message":"true"}},{"id":18,"code":"data(scurvy, package = \"medicaldata\")\nstr(scurvy)","options":{"autorun":"true","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-18","warning":"true","message":"true"}},{"id":19,"code":"ggplot(scurvy, aes(___, fill = ___)) + \n geom____()","options":{"autorun":"false","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-19","warning":"true","message":"true"}},{"id":20,"code":"ggplot(scurvy, aes(___, fill = ___)) + \n geom____(position = position_dodge2(preserve = ___))","options":{"autorun":"false","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-20","warning":"true","message":"true"}},{"id":21,"code":"ggplot(scurvy, aes(___, fill = ___)) + \n geom____(position = ___)","options":{"autorun":"false","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-21","warning":"true","message":"true"}},{"id":22,"code":"ggplot(scurvy, aes(___, fill = ___)) + \n geom____(position = ___) +\n coord____","options":{"autorun":"false","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-22","warning":"true","message":"true"}},{"id":23,"code":"data(nass.wheat, package = \"agridat\")\ndata(nass.corn, package = \"agridat\")\ndata(nass.soybean, package = \"agridat\")\n\nstr(nass.wheat)\nstr(nass.corn)\nstr(nass.soybean)","options":{"autorun":"true","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-23","warning":"true","message":"true"}},{"id":24,"code":"crops_data <- ___\n\nggplot(crops_data, aes(___, ___)) + \n geom____() + \n geom____(width = 0.1)","options":{"autorun":"false","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-24","warning":"true","message":"true"}},{"id":25,"code":"wheat2011_data <- nass.wheat |> \n ___(year == 2011) \n\nhighlight <- function(.data) filter(.data, acres > 4000000 | yield > 80)\n\nggplot(wheat2011_data, aes(___, yield)) + \n ___() + \n ___(data = ___, color = \"red\") + \n geom_text(___)","options":{"autorun":"false","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-25","warning":"true","message":"true"}},{"id":26,"code":"wheat2011_data_with_map <- nass.wheat |> \n filter(year == 2011) |> \n mutate(region = tolower(state)) |> \n right_join(map_data(\"state\"), by = \"region\")\n\nggplot(wheat2011_data_with_map, aes(___, ___)) + \n geom_polygon(aes(___), color = \"black\") +\n ___(\"label\", x = -120, y = 27, label = \"2011\", size = 8)","options":{"autorun":"false","results":"markup","classes":"","output":"true","read-only":"false","fig-height":5,"dpi":72,"out-height":"","fig-cap":"","fig-width":7,"out-width":"700px","context":"interactive","comment":"","label":"unnamed-chunk-26","warning":"true","message":"true"}}]; +
+ @@ -12026,8 +12026,8 @@

Available geom layers in ggplot2

Available stat layers in ggplot2

-
- +
+
@@ -13295,7 +13295,7 @@

Summary

  • data as data.frame
  • a set of aesthetic mappings between variables in the data and visual properties
  • at least one layer (usually geom_ or stat_ functions) which describes what to render
  • -
  • the coordinate system (explained next)
  • +
  • the coordinate system (explained later)
  • @@ -13315,7 +13315,7 @@

    ggplot2 cheatsheet

    Exercise time

    -

    30:00

    +

    30:00

    diff --git a/slides/slide2.html b/slides/slide2.html index 93f440a..edd51af 100644 --- a/slides/slide2.html +++ b/slides/slide2.html @@ -7480,7 +7480,7 @@ }; // Store cell data - globalThis.qwebrCellDetails = [{"options":{"comment":"","read-only":"false","message":"true","warning":"true","out-height":"","out-width":"700px","autorun":"false","context":"interactive","results":"markup","classes":"","output":"true","dpi":72,"fig-height":5,"fig-width":7,"fig-cap":"","label":"unnamed-chunk-1"},"code":"ghist <- ggplot(penguins, aes(bill_depth_mm)) +\n geom_histogram() \n\nlayer_data(ghist, 1)","id":1},{"options":{"comment":"","read-only":"false","message":"true","warning":"true","out-height":"","out-width":"700px","autorun":"false","context":"interactive","results":"markup","classes":"","output":"true","dpi":72,"fig-height":5,"fig-width":7,"fig-cap":"","label":"unnamed-chunk-2"},"code":"ggplot(penguins, aes(bill_depth_mm)) +\n geom_histogram(aes(y = after_stat(density))) ","id":2},{"options":{"comment":"","read-only":"false","message":"true","warning":"true","out-height":"","out-width":"700px","autorun":"false","context":"interactive","results":"markup","classes":"","output":"true","dpi":72,"fig-height":5,"fig-width":7,"fig-cap":"","label":"unnamed-chunk-3"},"code":"library(palmerpenguins)\nggplot(penguins, aes(island)) +\n geom_bar()\n\nggplot(penguins, aes(island)) +\n stat_count(geom = \"point\", size = 3)","id":3},{"options":{"comment":"","read-only":"false","message":"true","warning":"true","out-height":"","out-width":"700px","autorun":"true","context":"interactive","results":"markup","classes":"","output":"true","dpi":72,"fig-height":5,"fig-width":7,"fig-cap":"","label":"unnamed-chunk-4"},"code":"penguins_summary <- penguins %>% \n count(sex, species)\n\npenguins_summary","id":4},{"options":{"comment":"","read-only":"false","message":"true","warning":"true","out-height":"","out-width":"700px","autorun":"false","context":"interactive","results":"markup","classes":"","output":"true","dpi":72,"fig-height":5,"fig-width":7,"fig-cap":"","label":"unnamed-chunk-5"},"code":"ggplot(penguins_summary, \n aes(x = species, y = n)) +\n geom_col() ","id":5},{"options":{"comment":"","read-only":"false","message":"true","warning":"true","out-height":"","out-width":"700px","autorun":"false","context":"interactive","results":"markup","classes":"","output":"true","dpi":72,"fig-height":5,"fig-width":7,"fig-cap":"","label":"unnamed-chunk-6"},"code":"penguins_summary\n\nggplot(penguins_summary, aes(x = species, y = n, fill = sex)) +\n geom_col(position = \"stack\") # default position","id":6},{"options":{"comment":"","read-only":"false","message":"true","warning":"true","out-height":"","out-width":"700px","autorun":"false","context":"interactive","results":"markup","classes":"","output":"true","dpi":72,"fig-height":5,"fig-width":7,"fig-cap":"","label":"unnamed-chunk-7"},"code":"ggplot(penguins_summary,\n aes(species, n, fill = sex)) +\n geom_col(position = \"dodge\")","id":7},{"options":{"comment":"","read-only":"false","message":"true","warning":"true","out-height":"","out-width":"700px","autorun":"false","context":"interactive","results":"markup","classes":"","output":"true","dpi":72,"fig-height":5,"fig-width":7,"fig-cap":"","label":"unnamed-chunk-8"},"code":"ggplot(penguins_summary, \n aes(species, n, fill = sex)) +\n geom_col(position = position_dodge(preserve = \"single\"))","id":8},{"options":{"comment":"","read-only":"false","message":"true","warning":"true","out-height":"","out-width":"700px","autorun":"false","context":"interactive","results":"markup","classes":"","output":"true","dpi":72,"fig-height":5,"fig-width":7,"fig-cap":"","label":"unnamed-chunk-9"},"code":"ggplot(penguins_summary, \n aes(species, n, fill = sex)) +\n geom_col(position = position_dodge2(padding = 0.1))","id":9},{"options":{"comment":"","read-only":"false","message":"true","warning":"true","out-height":"","out-width":"700px","autorun":"false","context":"interactive","results":"markup","classes":"","output":"true","dpi":72,"fig-height":5,"fig-width":7,"fig-cap":"","label":"unnamed-chunk-10"},"code":"ggplot(penguins_summary, \n aes(species, n, fill = sex)) +\n geom_col(position = \"fill\")","id":10},{"options":{"comment":"","read-only":"false","message":"true","warning":"true","out-height":"","out-width":"700px","autorun":"false","context":"interactive","results":"markup","classes":"","output":"true","dpi":72,"fig-height":5,"fig-width":7,"fig-cap":"","label":"unnamed-chunk-11"},"code":"ggplot(penguins_summary, \n aes(species, n, fill = sex)) +\n geom_col(position = \"fill\") +\n coord_polar(\"y\")","id":11}]; + globalThis.qwebrCellDetails = [{"id":1,"code":"ghist <- ggplot(penguins, aes(bill_depth_mm)) +\n geom_histogram() \n\nlayer_data(ghist, 1)","options":{"fig-cap":"","results":"markup","dpi":72,"label":"unnamed-chunk-1","fig-width":7,"message":"true","output":"true","autorun":"false","out-width":"700px","read-only":"false","classes":"","comment":"","context":"interactive","fig-height":5,"warning":"true","out-height":""}},{"id":2,"code":"ggplot(penguins, aes(bill_depth_mm)) +\n geom_histogram(aes(y = after_stat(density))) ","options":{"fig-cap":"","results":"markup","dpi":72,"label":"unnamed-chunk-2","fig-width":7,"message":"true","output":"true","autorun":"false","out-width":"700px","read-only":"false","classes":"","comment":"","context":"interactive","fig-height":5,"warning":"true","out-height":""}},{"id":3,"code":"library(palmerpenguins)\nggplot(penguins, aes(island)) +\n geom_bar()\n\nggplot(penguins, aes(island)) +\n stat_count(geom = \"point\", size = 3)","options":{"fig-cap":"","results":"markup","dpi":72,"label":"unnamed-chunk-3","fig-width":7,"message":"true","output":"true","autorun":"false","out-width":"700px","read-only":"false","classes":"","comment":"","context":"interactive","fig-height":5,"warning":"true","out-height":""}},{"id":4,"code":"penguins_summary <- penguins %>% \n count(sex, species)\n\npenguins_summary","options":{"fig-cap":"","results":"markup","dpi":72,"label":"unnamed-chunk-4","fig-width":7,"message":"true","output":"true","autorun":"true","out-width":"700px","read-only":"false","classes":"","comment":"","context":"interactive","fig-height":5,"warning":"true","out-height":""}},{"id":5,"code":"ggplot(penguins_summary, \n aes(x = species, y = n)) +\n geom_col() ","options":{"fig-cap":"","results":"markup","dpi":72,"label":"unnamed-chunk-5","fig-width":7,"message":"true","output":"true","autorun":"false","out-width":"700px","read-only":"false","classes":"","comment":"","context":"interactive","fig-height":5,"warning":"true","out-height":""}},{"id":6,"code":"penguins_summary\n\nggplot(penguins_summary, aes(x = species, y = n, fill = sex)) +\n geom_col(position = \"stack\") # default position","options":{"fig-cap":"","results":"markup","dpi":72,"label":"unnamed-chunk-6","fig-width":7,"message":"true","output":"true","autorun":"false","out-width":"700px","read-only":"false","classes":"","comment":"","context":"interactive","fig-height":5,"warning":"true","out-height":""}},{"id":7,"code":"ggplot(penguins_summary,\n aes(species, n, fill = sex)) +\n geom_col(position = \"dodge\")","options":{"fig-cap":"","results":"markup","dpi":72,"label":"unnamed-chunk-7","fig-width":7,"message":"true","output":"true","autorun":"false","out-width":"700px","read-only":"false","classes":"","comment":"","context":"interactive","fig-height":5,"warning":"true","out-height":""}},{"id":8,"code":"ggplot(penguins_summary, \n aes(species, n, fill = sex)) +\n geom_col(position = position_dodge(preserve = \"single\"))","options":{"fig-cap":"","results":"markup","dpi":72,"label":"unnamed-chunk-8","fig-width":7,"message":"true","output":"true","autorun":"false","out-width":"700px","read-only":"false","classes":"","comment":"","context":"interactive","fig-height":5,"warning":"true","out-height":""}},{"id":9,"code":"ggplot(penguins_summary, \n aes(species, n, fill = sex)) +\n geom_col(position = position_dodge2(padding = 0.1))","options":{"fig-cap":"","results":"markup","dpi":72,"label":"unnamed-chunk-9","fig-width":7,"message":"true","output":"true","autorun":"false","out-width":"700px","read-only":"false","classes":"","comment":"","context":"interactive","fig-height":5,"warning":"true","out-height":""}},{"id":10,"code":"ggplot(penguins_summary, \n aes(species, n, fill = sex)) +\n geom_col(position = \"fill\")","options":{"fig-cap":"","results":"markup","dpi":72,"label":"unnamed-chunk-10","fig-width":7,"message":"true","output":"true","autorun":"false","out-width":"700px","read-only":"false","classes":"","comment":"","context":"interactive","fig-height":5,"warning":"true","out-height":""}},{"id":11,"code":"ggplot(penguins_summary, \n aes(species, n, fill = sex)) +\n geom_col(position = \"fill\") +\n coord_polar(\"y\")","options":{"fig-cap":"","results":"markup","dpi":72,"label":"unnamed-chunk-11","fig-width":7,"message":"true","output":"true","autorun":"false","out-width":"700px","read-only":"false","classes":"","comment":"","context":"interactive","fig-height":5,"warning":"true","out-height":""}}];