[R-SIG-Finance] newbie

Brian G. Peterson brian at braverock.com
Sun Dec 27 16:36:33 CET 2009


Andre de Boer wrote:
> Hello,
> 
> With quantmod (getSymbols(" ")) I imported some quotes from yahoo.
> For instance ING.AS (see below) and AGN.AS.
> 
> How can I compute now the correlation coefficient between ING.AS.Close and AGN.AS.Close?

You can access the columns by name:

ING.AS[,"Close"]
AGN.AS[,"Close"]
cor(ING.AS[,"Close"],AGN.AS[,"Close"])

You might also want to look at http://www.quantmod.com/ for a multitude of 
examples and documentation, and download one of the many R introductory 
tutorials you can find online.

Regards,

   - Brian

-- 
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock



More information about the R-SIG-Finance mailing list