[R] Boxplot of multiple vectors with different lengths
Kelly.Vining at oregonstate.edu
Tue Dec 13 00:09:20 CET 2011
Do you necessarily have to use "list"? Have you tried the usecols=TRUE option in boxplot?
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Ryan Utz
Sent: Monday, December 12, 2011 1:24 PM
To: r-help at r-project.org
Subject: [R] Boxplot of multiple vectors with different lengths
I'm attempting to write a code that automatically imports data from different files (with different lengths-just one variable) and makes tidy box plots for comparison. I can successfully import the data and create a list of the vectors I want to compare. But I cannot, for the life of me, figure out how to generate box plots using the "list" option. Suppose these are my data:
And this is my list of the vectors I'm interested in:
Well, this successfully generates the kind of boxplot I want:
But this does not:
Because I'm trying to write an automatic plot-generator as the amount of data I'm working with will typically vary, I need to write this to handle any number of data vectors.
I've tried every imaginable means of tweaking the name of "z", with zero success. And I've scoured the help pages for about 45 minutes (just to preempt any "read the help" responses). Please help!
Ryan Utz, Ph.D.
Aquatic Ecologist/STREON Scientist
National Ecological Observatory Network
Home/Cell: (724) 272-7769
Work: (720) 836-2488
[[alternative HTML version deleted]]
R-help at r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help