1) Try using the "cbind" function to combine to arrays by columns. This
will work for both the "matrix" and "data.frame" data types, so that
when you combine two arrays the first will be "stacked" on top of the
other.
2) One of the many great things about R is the ease with which you can
lookup things in a data.frame array. For instance, let's say I've got a
a data.frame full of numerical price data, with row names consisting of
the observation dates. Call my array "x". Then, to find the price in
column 3 on June 25th 2010 (for instance), all I have to do is type:

    x[rownames(x) == '2010-06-25', 3]

On the other hand, let's say that the dates are now in the first column
of my data array. One can do it this way:
    i <- which(x[,1] == '2010-06-25'); x[i,3]

(It's possible to do it more efficiently, obviously.)

On Mon, 2010-07-05 at 20:47 +0100, Raghu wrote:

> Hi
> 
> I am trying to append two price files into one for a correlation
> calculation. How do I achieve this using R? Also, is there a vlookup sort of
> function within R which I can use to get prices of two different securities
> for a particular date?
> 
> Thx
> 



	[[alternative HTML version deleted]]

