This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(gganimate) | |
data <- NULL | |
sample <- NULL | |
d <- NULL | |
for (i in (1:100)) { | |
set.seed(i+1234) | |
a <- rnorm(25, 1000, 50) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Slightly messy code - could easily be improved upon | |
#new version of gganimate not yet on CRAN so need to download from github with devtools package | |
#devtools::install_github('thomasp85/gganimate') | |
library(tidytext) | |
library(tidyverse) | |
library(rtweet) | |
library(gganimate) | |
library(lubridate) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usimg @micahgallen's nice raincloud plot code | |
# https://wellcomeopenresearch.org/articles/4-63 | |
# and fork of benmarwick/geom_flat_violin.R code | |
# gganimate by Thomas Lin Pedersen - @thomasp85 | |
devtools::install_github('thomasp85/gganimate') | |
library(tidyverse) | |
library(gganimate) | |
library(RColorBrewer) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
devtools::install_github('thomasp85/gganimate') | |
library(tidyverse) | |
library(gganimate) | |
#plotting two groups when no difference exists | |
df <- NULL | |
set.seed(1111) | |
sample_size=20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# somewhat hackish solution to: | |
# https://twitter.com/EamonCaddigan/status/646759751242620928 | |
# based mostly on copy/pasting from ggplot2 geom_violin source: | |
# https://github.com/hadley/ggplot2/blob/master/R/geom-violin.r | |
library(ggplot2) | |
library(dplyr) | |
"%||%" <- function(a, b) { |
NewerOlder