[R] boxplot on all the columns

Joshua Wiley jwiley.psych at gmail.com
Mon Jul 12 08:37:54 CEST 2010


On Sun, Jul 11, 2010 at 11:17 PM, Tal Galili <tal.galili at gmail.com> wrote:
> Actually,
> boxplot (bhtest1)
> Should do what you want...

Just a quick follow up, if you wanted a separate plot for each column
(I'm imagining the data resulting from your cbind() of 30 files in
your other thread for instance), you could use apply().  The stuff
with par() is just so that it asks for user input before changing
graphs.

old.ask <- par("ask") #store old setting
par("ask" = TRUE) # set ask to TRUE
apply(yourdata, 2, boxplot, plot=TRUE) #separate plot for each column
par("ask" = old.ask) # restore old setting

Josh

>
>
> Tal
>
> ----------------Contact
> Details:-------------------------------------------------------
> Contact me: Tal.Galili at gmail.com |  972-52-7275845
> Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
> www.r-statistics.com (English)
> ----------------------------------------------------------------------------------------------
>
>
>
>
> On Mon, Jul 12, 2010 at 7:14 AM, jd6688 <jdsignature at gmail.com> wrote:
>
>> boxplot (bhtest1
>
>        [[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