Skip to content

Instantly share code, notes, and snippets.

@benmarwick
Created October 24, 2024 04:17
Show Gist options
  • Select an option

  • Save benmarwick/da75e66d8a8e989ba0ff4f19e58c54e4 to your computer and use it in GitHub Desktop.

Select an option

Save benmarwick/da75e66d8a8e989ba0ff4f19e58c54e4 to your computer and use it in GitHub Desktop.

Revisions

  1. benmarwick created this gist Oct 24, 2024.
    19 changes: 19 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    data <- tibble( x = c(
    # Peak 1 (around 0-2)
    rep(1, 50), rep(2, 30), rep(3, 20),

    # Dip (middle values)
    rep(4, 10), rep(5, 8), rep(6, 8), rep(7, 10),

    # Peak 2 (around 10-12)
    rep(8, 20), rep(9, 30), rep(10, 50)
    ))


    ggplot(data) +
    aes(x) +
    geom_histogram(bins = 10)

    ggplot(data) +
    aes(x) +
    geom_boxplot()