Skip to content

Instantly share code, notes, and snippets.

@sachsmc
Created November 26, 2013 19:16
Show Gist options
  • Save sachsmc/7664312 to your computer and use it in GitHub Desktop.
Save sachsmc/7664312 to your computer and use it in GitHub Desktop.
cibars <- function(x, y, y.se, tinyfactor = 50, ...){
lower <- y - 1.96*y.se
upper <- y + 1.96*y.se
segments(x0 = x, y0 = lower, x1 = x, y1 = upper, ...)
tinybarwidth <- (max(x) - min(x))/tinyfactor
segments(x0 = x - tinybarwidth, y0 = lower, x1 = x + tinybarwidth, y1 = lower, ...)
segments(x0 = x - tinybarwidth, y0 = upper, x1 = x + tinybarwidth, y1 = upper, ...)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment