diff options
author | Samuel Fadel <samuelfadel@gmail.com> | 2016-08-22 12:06:48 -0300 |
---|---|---|
committer | Samuel Fadel <samuelfadel@gmail.com> | 2016-08-22 12:06:48 -0300 |
commit | 2e1e2a153a2d193b1de1d3fe23f5f821fe8c56a1 (patch) | |
tree | c8150837a55b8525299dedfb36a9b31bd43048a0 /util.R | |
parent | 609f5a8bd986b043e5a41088e4ebb7ba8c4b059a (diff) |
plot.R: added confidence interval plots.
Diffstat (limited to 'util.R')
-rw-r--r-- | util.R | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -13,3 +13,12 @@ dir.create.safe <- function(path, log=T) { dir.create(path) } } + +# Confidence interval stat summary +ci.fun <- function(d) { + test <- t.test(d) + ci <- test$conf.int + m <- as.double(test$estimate) + + data.frame(ymin=ci[1], ymax=ci[2], y=m) +} |