Skip to content

Instantly share code, notes, and snippets.

@jake-westfall
Last active April 12, 2016 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jake-westfall/7b1c88eda9f5b12017ef6e4d89d8a5fb to your computer and use it in GitHub Desktop.
Save jake-westfall/7b1c88eda9f5b12017ef6e4d89d8a5fb to your computer and use it in GitHub Desktop.
for blog
dat <- read.table("http://pcl.missouri.edu/exp/effectSizePuzzler.txt", header=TRUE)
str(dat)
# 'data.frame': 2500 obs. of 3 variables:
# $ id : int 1 1 1 1 1 1 1 1 1 1 ...
# $ cond: int 1 1 1 1 1 1 1 1 1 1 ...
# $ rt : num 0.56 0.93 0.795 0.615 1.028 ...
(means <- with(dat, tapply(rt, cond, mean)))
# 1 2
# 0.8322560 0.8845544
md <- diff(means)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment