Wednesday, March 11, 2009

R Basics - I


Reading Data in R

The vector is the simplest way to store more than one value in R. The 'c' function (mnemonic for catenate or combine) allows you to quickly enter data into R:

> x = c(1, 2, 5, 10) 

# or x <- c(1, 2, 5, 10)

[TBC]

R


Good as MATLAB is for prototyping, its scalability in working with larger datasets - I have in mind high frequency financial data - is a problem (or may be I just don't know how to yet). 
`
I needn't talk about the virtues of R. It has a strong user-base and also has many contributed financial / econometrics packages (e.g. Rmetrics and AER) to make our life easier. The hope is to be able to read high-frequency datasets in a reasonable amount of time (may be with a little bit of help from Perl?) and then exploit R's statistical abilities. 

The first thing we need to figure out is how to read data in R and then learn about vectorization. The rest should be easier.