[R] Grouped bar plot

2011-05-18 Thread jctoll
Hi, I am trying to produce a grouped bar plot from a data.frame and I'm having difficulties figuring out how to do so. My data is 500 rows by 4 columns and basically looks like so: head(x) V1V2V3V4 1 XOM 0.2317915 0.1610068 1.6941637 2 AAPL 0.6735488 0.7433611

[R] taking rows from data.frames in list to form new data.frame?

2011-04-20 Thread jctoll
Hi, I am having a problem figuring out how to extract a subset of rows. I have a list with 68 similar data.frames. Each data.frame is 500 rows by 5 columns. I want to take one row from each data.frame based upon the data in a particular column (i.e. it matches a symbol). For example:

Re: [R] taking rows from data.frames in list to form new data.frame?

2011-04-20 Thread jctoll
for? [Obviously untested for the usual reasons...] HTH, Dennis On Wed, Apr 20, 2011 at 4:13 PM, jctoll jct...@gmail.com wrote: Hi, I am having a problem figuring out how to extract a subset of rows.  I have a list with 68 similar data.frames.  Each data.frame is 500 rows by 5 columns.  I

Re: [R] Need to abstract changing name of column within loop

2011-03-17 Thread jctoll
On Thu, Mar 17, 2011 at 10:32 AM, Joshua Ulrich josh.m.ulr...@gmail.com wrote: On Wed, Mar 16, 2011 at 6:58 PM, jctoll jct...@gmail.com wrote: Hi, I'm struggling to figure out the way to change the name of a column from within a loop.  The problem is I can't refer to the object by its actual

[R] Need to abstract changing name of column within loop

2011-03-16 Thread jctoll
Hi, I'm struggling to figure out the way to change the name of a column from within a loop. The problem is I can't refer to the object by its actual variable name, since that will change each time through the loop. My xts object is A. head(A) A.Open A.High A.Low A.Close A.Volume

Re: [R] Need to abstract changing name of column within loop

2011-03-16 Thread jctoll
On Wed, Mar 16, 2011 at 8:20 PM, David Winsemius dwinsem...@comcast.net wrote: On Mar 16, 2011, at 7:58 PM, jctoll wrote: Hi, I'm struggling to figure out the way to change the name of a column from within a loop.  The problem is I can't refer to the object by its actual variable name

[R] Finding pairs with least magnitude difference from mean

2011-02-25 Thread jctoll
Hi, I have what I think is some kind of linear programming question. Basically, what I want to figure out is if I have a vector of numbers, x - rnorm(10) x [1] -0.44305959 -0.26707077 0.07121266 0.44123714 -1.10323616 -0.19712807 0.20679494 -0.98629992 0.97191659 -0.77561593 mean(x)

Re: [R] Applying multiple functions to one object

2011-02-04 Thread jctoll
On Wed, Feb 2, 2011 at 7:59 AM, Karl Ove Hufthammer k...@huftis.org wrote: Dear list members, I recall seeing a convenience function for applying multiple functions to one object (i.e., almost the opposite of 'mapply’) somewhere. Example: If the function was named ’fun’ the output of