Hello,
I know this has been covered on here before, but as a complete novice, I
need a little more guidance. I would like to produce boxplots with the
whiskers extending to the 10 and 90th percentiles. I found this code:
myboxplot.stats <- function (x, coef = NULL, do.conf = TRUE, do.out =
TRUE)
{
nna <- !is.na(x)
n <- sum(nna)
stats <- quantile(x, c(.1,.25,.5,.75,.9), na.rm = TRUE)
iqr <- diff(stats[c(2, 4)])
out <- x < stats[1] | x > stats[5]
conf <- if (do.conf)
stats[3] + c(-1.58, 1.58) * diff(stats[c(2, 4)])/sqrt(n)
list(stats = stats, n = n, conf = conf, out = x[out & nna])
}
posted by Mr. Jim Bowers, and additional posts discussing how to make
it work. The issue I am having is that all the posts say to edit
boxplot.default, but I have no idea how to actually do that. I've
tried fix(bowplot.default)
and fixInNamespace(...), but what do I actually change? I tried
including an argument "stats=myboxplot.stats" but that did not change
anything. Once it is changed, can I just use the same "boxplot(...)"
code as normal or
do I need to use myboxplot? I know this should be simple, but it is
generating a lot of frustration. Any help would be greatly
appreciated.
Thanks, James
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.