Re: [R] Proper Syntax for Logical Subset in Subset()

2011-11-02 Thread Rich Shepard
On Wed, 2 Nov 2011, Bert Gunter wrote: To make such a plot, I would have thought your want your data structure to be: Column A: Date Column B; Chemical Column C: Result Thanks, Bert. I have a data frame in that format. After subsetting this to the chemicals you want or doing the subsett

Re: [R] Proper Syntax for Logical Subset in Subset()

2011-11-02 Thread Bert Gunter
Of course I left out the "data" argument: boxplot(Result ~ Chemical, data= yourdat,subset=yourdat$Chemical %in% c("Ca","Cl", "Cond","Mg","Na","SO2","TDS")) -- Bert On Wed, Nov 2, 2011 at 10:08 AM, Bert Gunter wrote: > To make such a plot, I would have thought your want your data structure to >

Re: [R] Proper Syntax for Logical Subset in Subset()

2011-11-02 Thread Bert Gunter
To make such a plot, I would have thought your want your data structure to be: yourdat: Column A: Date Column B; Chemical Column C: Result After subsetting this to the chemicals you want or doing the subsetting in your plot command, something like (base R) boxplot(Result ~ Chemical, subset

Re: [R] Proper Syntax for Logical Subset in Subset()

2011-11-02 Thread Seeliger . Curt
>I have measured values for 47 chemicals in a stream. After processing > the original data frame through reshape2, the recast data frame has this > structure: > > 'data.frame': 256 obs. of 47 variables: > $ site : Factor w/ 143 levels "BC-0.5","BC-1",..: 1 1 1 2 2 2 2 2 2 2... > $

Re: [R] Proper Syntax for Logical Subset in Subset()

2011-11-02 Thread Rich Shepard
On Wed, 2 Nov 2011, Rich Shepard wrote: I want a subset of this with only 7 chemicals: Ca, Cl, Cond, Mg, Na, SO4, and TDS. I should have also written that what I ultimately want is to create a box-and-whisker plot for these 7 chemicals in a single panel. If that can be done directly from th

[R] Proper Syntax for Logical Subset in Subset()

2011-11-02 Thread Rich Shepard
I have measured values for 47 chemicals in a stream. After processing the original data frame through reshape2, the recast data frame has this structure: 'data.frame': 256 obs. of 47 variables: $ site : Factor w/ 143 levels "BC-0.5","BC-1",..: 1 1 1 2 2 2 2 2 2 2 ... $ sampdate : Date,