[R] boxplot knowing Q1, Q3, median, upper and lower whisker value
Joshua Wiley
jwiley.psych at gmail.com
Mon Sep 6 18:21:03 CEST 2010
Hi Dave,
You can look at the function ?bxp it might work for you. Alternately,
create a meaningless boxplot object, and then just edit that data, in
which case I know it will work with bxp().
# Create a boxplot, the data does not matter
x <- boxplot(1:10)
x # view the data for the boxplot
x$stats <- c() # put the stats here, min Q1, median, Q3, max
# or hinges or whatever you like
x$n <- c() # the number of observations, though you do not need to change this
bxp(x) # plot boxplot with updated info
HTH,
Josh
On Mon, Sep 6, 2010 at 8:46 AM, David A. <dasolexa at hotmail.com> wrote:
>
> Dear list,
>
> I am using a external program that outputs Q1, Q3, median, upper and lower whisker values for various datasets simultaneously in a tab delimited format. After importing this text file into R, I would like to plot a boxplot using these given values and not the original series of data points, i.e. not using something like boxplot(mydata).
>
> Is there an easy way for doing this? If I am not wrong, boxplot() does not accept these values as parameters.
>
> Cheers,
>
> Dave
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org 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.
>
--
Joshua Wiley
Ph.D. Student, Health Psychology
University of California, Los Angeles
http://www.joshuawiley.com/
More information about the R-help
mailing list